]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Merge remote branch 'esi/template-toolkit-opac' into template-toolkit-opac-master...
[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         </fields>
823         <links>
824             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
825         </links>
826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
827             <actions>
828                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
829                 <retrieve/>
830                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
831                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
832             </actions>
833         </permacrud>
834     </class>
835
836     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
837         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
838             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
839             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
840             <field reporter:label="Name" name="name" reporter:datatype="text"/>
841             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
842             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
843             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
844             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
845         </fields>
846         <links>
847             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
848         </links>
849     </class>
850
851         <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">
852                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
853                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
855                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
856                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
857                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
858                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
859                 </fields>
860                 <links>
861             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
862             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
863                 </links>
864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
865                         <actions>
866                                 <retrieve/>
867                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
868                         </actions>
869                 </permacrud>
870         </class>
871
872         <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">
873                 <fields oils_persist:primary="key">
874                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
875                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
878                 </fields>
879                 <links/>
880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
881                         <actions>
882                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
883                                 <retrieve/>
884                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
885                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
886                         </actions>
887                 </permacrud>
888         </class>
889
890         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
891                 <fields oils_persist:primary="module">
892                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
893                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
894                 </fields>
895                 <links/>
896         </class>
897
898         <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">
899                 <fields oils_persist:primary="module">
900                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
901                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
902                 </fields>
903                 <links/>
904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
905                         <actions>
906                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
907                                 <retrieve/>
908                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
909                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
910                         </actions>
911                 </permacrud>
912         </class>
913
914         <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">
915                 <fields oils_persist:primary="module">
916                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
917                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
918                 </fields>
919                 <links/>
920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921                         <actions>
922                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
923                                 <retrieve/>
924                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
925                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
926                         </actions>
927                 </permacrud>
928         </class>
929
930         <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">
931                 <fields oils_persist:primary="module">
932                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
934                 </fields>
935                 <links/>
936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937                         <actions>
938                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
939                                 <retrieve/>
940                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
941                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
942                         </actions>
943                 </permacrud>
944         </class>
945
946         <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">
947                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
948                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
949                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
950                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
951                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
952                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
953                 </fields>
954                 <links>
955                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
956                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
957                 </links>
958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
959                         <actions>
960                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
961                     <context link="event_def" field="owner"/>
962                 </create>
963                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
964                     <context link="event_def" field="owner"/>
965                 </retrieve>
966                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
967                     <context link="event_def" field="owner"/>
968                 </update>
969                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
970                     <context link="event_def" field="owner"/>
971                 </delete>
972                         </actions>
973                 </permacrud>
974         </class>
975
976         <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">
977                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
978                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
979                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
980                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
981                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
982                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
983                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
984                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
985                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
986                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
987                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
988                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
989                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
990                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
991                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
992                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
993                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
994                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
995                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
996                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
997                 </fields>
998                 <links>
999                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1000                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1001                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1002                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1003                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1004                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1005                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1006                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1007                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1008                 </links>
1009                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1010                         <actions>
1011                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1012                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1013                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1014                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1015                         </actions>
1016                 </permacrud>
1017         </class>
1018
1019         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1020                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1021                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1022                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1023                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1024                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1025                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1026                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1027                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1028                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1029                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1030                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1031                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1032                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1033                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1034                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1035                 </fields>
1036                 <links>
1037                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1038                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1039                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1040                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1041                 </links>
1042         </class>
1043
1044         <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">
1045                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1046                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1047                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1048                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1049                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1050                 </fields>
1051                 <links>
1052                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1053                 </links>
1054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055                         <actions>
1056                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1057                     <context link="event_def" field="owner"/>
1058                 </create>
1059                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1060                     <context link="event_def" field="owner"/>
1061                 </retrieve>
1062                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1063                     <context link="event_def" field="owner"/>
1064                 </update>
1065                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1066                     <context link="event_def" field="owner"/>
1067                 </delete>
1068                         </actions>
1069                 </permacrud>
1070         </class>
1071
1072         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1074                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1075                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1076                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1077                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1078                 </fields>
1079                 <links>
1080                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1081                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1082                 </links>
1083         </class>
1084
1085         <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">
1086                 <fields oils_persist:primary="code">
1087                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1088                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1089                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1090                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1091                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1092                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1093                 </fields>
1094                 <links/>
1095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1096             <actions>
1097                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1098                 <retrieve/>
1099                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1100                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1101             </actions>
1102         </permacrud>
1103         </class>
1104
1105         <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">
1106                 <fields oils_persist:primary="code">
1107                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1108                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1109                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1110                 </fields>
1111                 <links/>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1115                 <retrieve/>
1116                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1117                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields oils_persist:primary="code">
1124                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1125                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1126                 </fields>
1127                 <links/>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1131                 <retrieve/>
1132                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1133                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="code">
1140                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1141                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1142                 </fields>
1143                 <links/>
1144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1145             <actions>
1146                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1147                 <retrieve/>
1148                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1149                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1150             </actions>
1151         </permacrud>
1152         </class>
1153
1154         <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">
1155                 <fields oils_persist:primary="code">
1156                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1157                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1158                 </fields>
1159                 <links/>
1160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1161             <actions>
1162                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1163                 <retrieve/>
1164                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1165                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1166             </actions>
1167         </permacrud>
1168         </class>
1169
1170         <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">
1171                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1172                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1173                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1174                 </fields>
1175                 <links/>
1176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1177             <actions>
1178                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1179                 <retrieve/>
1180                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1181                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1182             </actions>
1183         </permacrud>
1184         </class>
1185
1186         <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">
1187                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1188                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1189                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1190                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1191                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1192                 </fields>
1193         <links>
1194             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1195             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1196             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1197         </links>
1198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1199             <actions>
1200                 <create permission="UPDATE_COPY">
1201                     <context link="target_copy" field="circ_lib"/>
1202                 </create>
1203                 <retrieve/>
1204                 <update permission="UPDATE_COPY">
1205                     <context link="target_copy" field="circ_lib"/>
1206                 </update>
1207                 <delete permission="UPDATE_COPY">
1208                     <context link="target_copy" field="circ_lib"/>
1209                 </delete>
1210             </actions>
1211         </permacrud>
1212         </class>
1213
1214         <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">
1215                 <fields oils_persist:primary="code">
1216                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1217                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1218                 </fields>
1219                 <links/>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1225                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228         </class>
1229
1230         <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">
1231                 <fields oils_persist:primary="code">
1232                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1233                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1234                 </fields>
1235                 <links/>
1236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1237             <actions>
1238                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1239                 <retrieve/>
1240                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1241                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1242             </actions>
1243         </permacrud>
1244         </class>
1245
1246         <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">
1247                 <fields oils_persist:primary="code">
1248                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1249                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1250                 </fields>
1251                 <links/>
1252         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1253             <actions>
1254                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1255                 <retrieve/>
1256                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1257                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1258             </actions>
1259         </permacrud>
1260         </class>
1261
1262     <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">
1263         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1264             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1265             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1266             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1267             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1268             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1269             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1270             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1271             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1272             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1273             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1274             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1275             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1276             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1277             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1278             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1279         </fields>
1280         <links/>
1281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1282             <actions>
1283                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1284                 <retrieve/>
1285                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1286                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1287             </actions>
1288         </permacrud>
1289     </class>
1290
1291     <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">
1292         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1293             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1294             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1295             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1296             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1297             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1298             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1299             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1300             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1301             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1302             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1303             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1304             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1305             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1306             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1307             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1308         </fields>
1309         <links/>
1310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1311             <actions>
1312                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1313                 <retrieve/>
1314                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1315                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1316             </actions>
1317         </permacrud>
1318     </class>
1319
1320     <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">
1321         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1322             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1323             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1324             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1325             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1326             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1327         </fields>
1328         <links>
1329             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1330             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1331             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1332         </links>
1333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1334             <actions>
1335                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1336                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1337                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1338                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1339             </actions>
1340         </permacrud>
1341     </class>
1342
1343         <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">
1344                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1345                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1346                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1347                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1348                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1349                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1350                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1351                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1352                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1353                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1354                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1355                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1356                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1357                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1360                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1361             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1362                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1363                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1364                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1365                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1366                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1367                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1368                 </fields>
1369                 <links>
1370                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1371                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1372                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1373                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1374                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1375                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1376                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1377                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1378                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1379                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1380                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1381                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1382                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1383             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1384                 </links>
1385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1386             <actions>
1387                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1388                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1389                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1390                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1391             </actions>
1392         </permacrud>
1393         </class>
1394
1395         <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">
1396                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1397                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1398                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1399                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1400                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1401                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1402                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1403                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1404                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1405                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1406                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1407                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1408                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1409                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1410                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1411             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1412                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1413                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1414             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1415                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1416                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1417                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1418                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1419             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1420             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1421             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1422                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1423                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1424                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1425                 </fields>
1426                 <links>
1427                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1428                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1429                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1430                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1431                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1432                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1433                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1434                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1435                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1436                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1437                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1438                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1439                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1440             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1441                 </links>
1442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1443             <actions>
1444                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1445                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1446                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1447                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1448             </actions>
1449         </permacrud>
1450         </class>
1451
1452         <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">
1453                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1454                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1455                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1456                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1457                 </fields>
1458                 <links>
1459                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1460                 </links>
1461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1462             <actions>
1463                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1464                     <context link="matchpoint" field="org_unit"/>
1465                 </create>
1466                 <retrieve/>
1467                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1468                     <context link="matchpoint" field="org_unit"/>
1469                 </update>
1470                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1471                     <context link="matchpoint" field="org_unit"/>
1472                 </delete>
1473             </actions>
1474         </permacrud>
1475         </class>
1476
1477         <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">
1478                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1479                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1480                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1481                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1482                 </fields>
1483                 <links>
1484                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1485                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1486                 </links>
1487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1488             <actions>
1489                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1490                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1491                 </create>
1492                 <retrieve/>
1493                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1494                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1495                 </update>
1496                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1497                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1498                 </delete>
1499             </actions>
1500         </permacrud>
1501         </class>
1502
1503         <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">
1504                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1505                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1506                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1507                 </fields>
1508                 <links/>
1509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1510             <actions>
1511                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1512                 <retrieve/>
1513                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1514                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1515             </actions>
1516         </permacrud>
1517         </class>
1518
1519         <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">
1520                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1521                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1522                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1523                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1524                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1525                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1526                 </fields>
1527                 <links>
1528                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1529                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1530                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1531                 </links>
1532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1533             <actions>
1534                 <create permission="ADMIN_SURVEY">
1535                     <context link="survey" field="owner"/>
1536                 </create>
1537                 <retrieve/>
1538                 <update permission="ADMIN_SURVEY">
1539                     <context link="survey" field="owner"/>
1540                 </update>
1541                 <delete permission="ADMIN_SURVEY">
1542                     <context link="survey" field="owner"/>
1543                 </delete>
1544             </actions>
1545         </permacrud>
1546         </class>
1547         <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">
1548                 <fields oils_persist:primary="id" oils_persist:sequence="">
1549                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1550                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1551                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1552                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1553                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1554                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1555                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1556                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1557                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1558                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1559                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1560                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1561                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1562                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1563                 </fields>
1564                 <links>
1565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1566                 </links>
1567         </class>
1568         <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">
1569                 <fields oils_persist:primary="id" oils_persist:sequence="">
1570                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1571                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1572                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1573                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1574                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1575                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1576                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1577                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1578                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1579                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1580                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1581                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1582                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1583                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1584                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1585                 </fields>
1586                 <links>
1587                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1588                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1589                 </links>
1590         </class>
1591         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1592                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1593                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1594                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1595                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1596                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1597                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1598                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1599                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1600                 </fields>
1601                 <links>
1602                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1603                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1604                 </links>
1605         </class>
1606         <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">
1607                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1608                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1609                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1610                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1611                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1612                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1613                 </fields>
1614                 <links>
1615                         <link field="usr" reltype="has_a" key="id" class="au"/>
1616                 </links>
1617         </class>
1618         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1619                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1620                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1621                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1622                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1623                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1624                 </fields>
1625                 <links>
1626                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1627                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1628                 </links>
1629         </class>
1630         <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">
1631                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1632                         <field name="field" reporter:datatype="link"/>
1633                         <field name="id" reporter:datatype="id" />
1634                         <field name="source" reporter:datatype="link"/>
1635                         <field name="value" reporter:datatype="text"/>
1636                 </fields>
1637                 <links>
1638                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1639                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1640                 </links>
1641         </class>
1642         <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">
1643                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1644                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1645                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1646                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1647                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1648                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1649                 </fields>
1650                 <links>
1651                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1652                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1653                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1654                 </links>
1655         </class>
1656         <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">
1657                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1658                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1659                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1660                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1661                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1662                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1663                 </fields>
1664                 <links>
1665                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1666                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1667                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1668                 </links>
1669         </class>
1670         <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">
1671                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1672                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1673                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1674                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1675                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1676                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1677                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1678                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1679                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1680                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1681                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1682                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1683                 </fields>
1684                 <links>
1685                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1686                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1687                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1688                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1689                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1690                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1691                 </links>
1692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1693             <actions>
1694                 <create permission="TRANSIT_COPY" context_field="owner">
1695                     <context link="target_copy" field="circ_lib"/>
1696                 </create>
1697                 <retrieve/>
1698                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1699                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1700             </actions>
1701         </permacrud>
1702         </class>
1703         <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">
1704                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1705                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1706                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1707                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1708                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1709                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1710                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1711                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1712                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1713                 </fields>
1714                 <links>
1715                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1716                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1717                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1718                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1719                 </links>
1720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1721             <actions>
1722                 <create permission="ADMIN_SURVEY">
1723                     <context link="survey" field="owner"/>
1724                 </create>
1725                 <retrieve/>
1726                 <update permission="ADMIN_SURVEY">
1727                     <context link="survey" field="owner"/>
1728                 </update>
1729                 <delete permission="ADMIN_SURVEY">
1730                     <context link="survey" field="owner"/>
1731                 </delete>
1732             </actions>
1733         </permacrud>
1734         </class>
1735         <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">
1736                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1737                         <field name="bucket" />
1738                         <field name="id" reporter:datatype="id" />
1739                         <field name="target_copy" reporter:datatype="link"/>
1740                         <field name="create_time" reporter:datatype="timestamp" />
1741                         <field name="pos" reporter:datatype="int" />
1742                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1743                 </fields>
1744                 <links>
1745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1746                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1747             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1748                 </links>
1749         </class>
1750         <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">
1751                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1752                         <field name="id" reporter:datatype="id" />
1753                         <field name="item" reporter:datatype="link"/>
1754                         <field name="note" reporter:datatype="text" />
1755                 </fields>
1756                 <links>
1757                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1758                 </links>
1759         </class>
1760
1761         <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">
1762                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1763                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1765                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1766                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1767                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1768                 </fields>
1769                 <links>
1770                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1771                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1772                 </links>
1773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1774                         <actions>
1775                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1776                                 <retrieve/>
1777                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1778                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1779                         </actions>
1780                 </permacrud>
1781         </class>
1782
1783         <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">
1784                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1785                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1786                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1787                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1788                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1789                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1790                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1791                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1792                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1793                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1794                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1795                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1796                 </fields>
1797                 <links>
1798                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1799                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1800                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1801                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1802                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1803                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1804                 </links>
1805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1806                         <actions>
1807                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1808                                 <retrieve/>
1809                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1810                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1811                         </actions>
1812                 </permacrud>
1813         </class>
1814
1815         <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">
1816                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1817                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1818                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1819                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1820                 </fields>
1821                 <links>
1822                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1823                 </links>
1824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1825                         <actions>
1826                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1827                                 <retrieve/>
1828                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1829                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1830                         </actions>
1831                 </permacrud>
1832         </class>
1833
1834         <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">
1835                 <fields oils_persist:primary="code">
1836                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1837                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1838                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1839                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1840                 </fields>
1841                 <links>
1842                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1843                 </links>
1844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1845                         <actions>
1846                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1847                                 <retrieve/>
1848                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1849                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1850                         </actions>
1851                 </permacrud>
1852         </class>
1853
1854         <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">
1855                 <fields oils_persist:primary="code">
1856                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1857                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1858                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1859                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1860                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1861                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1862                 </fields>
1863                 <links>
1864                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1865                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1866                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1867                 </links>
1868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1869                         <actions>
1870                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1871                                 <retrieve/>
1872                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1873                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                         </actions>
1875                 </permacrud>
1876         </class>
1877
1878     <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">
1879         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1880             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1881             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1882             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1883         </fields>
1884         <links>
1885             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1886             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1887         </links>
1888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1889             <actions>
1890                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1891                 <retrieve/>
1892                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1893                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1894             </actions>
1895         </permacrud>
1896     </class>
1897
1898         <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">
1899                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1900                         <field name="active" reporter:datatype="bool"/>
1901                         <field name="create_date" reporter:datatype="timestamp"/>
1902                         <field name="creator" />
1903                         <field name="deleted" reporter:datatype="bool"/>
1904                         <field name="edit_date" reporter:datatype="timestamp"/>
1905                         <field name="editor" />
1906                         <field name="id" reporter:datatype="id" />
1907                         <field name="last_xact_id" />
1908                         <field name="marc" />
1909                         <field name="source" />
1910                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1911                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1912                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1913                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1914                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1915                 </fields>
1916                 <links>
1917                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1918                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1919                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1920                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1921                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1922                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1923                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1924                 </links>
1925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1926                         <actions>
1927                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1928                                 <retrieve/>
1929                                 <update permission="UPDATE_MARC" global_required="true"/>
1930                                 <delete permission="UPDATE_MARC" global_required="true"/>
1931                         </actions>
1932                 </permacrud>
1933         </class>
1934         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1935                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1936                         <field name="char_encoding" />
1937                         <field name="id" />
1938                         <field name="record" />
1939                         <field name="record_status" />
1940                         <field name="thesaurus" />
1941                 </fields>
1942                 <links>
1943                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1944                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
1945                 </links>
1946         </class>
1947         <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">
1948                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1949                         <field name="id" reporter:datatype="id" />
1950                         <field name="bib" reporter:datatype="link" />
1951                         <field name="authority" reporter:datatype="link" />
1952                 </fields>
1953                 <links>
1954                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1955                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1956                 </links>
1957         </class>
1958         <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">
1959                 <fields oils_persist:primary="code" oils_persist:sequence="">
1960                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1961                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1962                 </fields>
1963                 <links/>
1964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1965             <actions>
1966                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1967                 <retrieve/>
1968                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1969                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1970             </actions>
1971         </permacrud>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1975                         <field name="accepting_usr" />
1976                         <field name="amount" reporter:datatype="money" />
1977                         <field name="amount_collected" reporter:datatype="money" />
1978                         <field name="approval_code" reporter:datatype="text"/>
1979                         <field name="cash_drawer" reporter:datatype="link"/>
1980                         <field name="cc_first_name" reporter:datatype="text"/>
1981                         <field name="cc_last_name" reporter:datatype="text"/>
1982                         <field name="cc_number" reporter:datatype="text"/>
1983                         <field name="cc_order_number" reporter:datatype="text"/>
1984                         <field name="cc_type" reporter:datatype="text"/>
1985                         <field name="cc_processor" reporter:datatype="text"/>
1986                         <field name="expire_month" reporter:datatype="int" />
1987                         <field name="expire_year" reporter:datatype="int" />
1988                         <field name="id" reporter:datatype="id" />
1989                         <field name="note" reporter:datatype="text"/>
1990                         <field name="payment_ts" reporter:datatype="timestamp"/>
1991                         <field name="xact" reporter:datatype="link"/>
1992                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1993                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1994                 </fields>
1995                 <links>
1996                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1997                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1998                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1999                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2000                 </links>
2001         </class>
2002         <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">
2003                 <fields oils_persist:primary="name">
2004                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2005                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2006                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2007                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2008                 </fields>
2009                 <links/>
2010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2011             <actions>
2012                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2013                 <retrieve/>
2014                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2015                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2016             </actions>
2017         </permacrud>
2018         </class>
2019
2020         <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">
2021                 <fields oils_persist:primary="alias">
2022                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2023                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2024                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2025                 </fields>
2026                 <links>
2027                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2028                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2029                 </links>
2030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2031             <actions>
2032                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2033                 <retrieve/>
2034                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2035                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2036             </actions>
2037         </permacrud>
2038         </class>
2039
2040         <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">
2041                 <fields oils_persist:primary="name">
2042                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2043                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2044                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2045                 </fields>
2046                 <links>
2047                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2048                 </links>
2049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2050             <actions>
2051                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2052                 <retrieve/>
2053                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2054                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2055             </actions>
2056         </permacrud>
2057         </class>
2058
2059         <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">
2060                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2061                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2062                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2063                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2064                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2065                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2066                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2067                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2068                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2069                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2070                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2071                 </fields>
2072                 <links>
2073                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2074                 </links>
2075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2076             <actions>
2077                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2078                 <retrieve/>
2079                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2080                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2081             </actions>
2082         </permacrud>
2083         </class>
2084         <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">
2085                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2086                         <field name="id" reporter:datatype="id" />
2087                         <field name="name" reporter:datatype="text"/>
2088                         <field name="xpath" reporter:datatype="text"/>
2089                         <field name="format" reporter:datatype="link"/>
2090                         <field name="first_word" reporter:datatype="bool" />
2091                 </fields>
2092                 <links/>
2093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2094             <actions>
2095                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2096                 <retrieve/>
2097                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2098                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2099             </actions>
2100         </permacrud>
2101         </class>
2102         <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">
2103                 <fields oils_persist:primary="code" oils_persist:sequence="">
2104                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2105                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2106                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2107                 </fields>
2108                 <links/>
2109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2110             <actions>
2111                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2112                 <retrieve/>
2113                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2114                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2115             </actions>
2116         </permacrud>
2117         </class>
2118         <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">
2119                 <fields oils_persist:primary="code" oils_persist:sequence="">
2120                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2121                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2122                 </fields>
2123                 <links/>
2124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2125             <actions>
2126                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2127                 <retrieve/>
2128                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2129                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2130             </actions>
2131         </permacrud>
2132         </class>
2133     <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">
2134         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2135             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
2136             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2137             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2138             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2139         </fields>
2140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2141             <actions>
2142                 <retrieve/>
2143             </actions>
2144         </permacrud>
2145     </class>
2146         <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">
2147                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2148                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2149                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2150                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2151                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2152                 </fields>
2153                 <links>
2154                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2155                 </links>
2156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157             <actions>
2158                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2159                 <retrieve/>
2160                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2161                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2162             </actions>
2163         </permacrud>
2164         </class>
2165         <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">
2166                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2167                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2168                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2169                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2170                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2171                 </fields>
2172                 <links>
2173                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2174                 </links>
2175         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2176             <actions>
2177                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2178                 <retrieve/>
2179                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2180                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2181             </actions>
2182         </permacrud>
2183         </class>
2184         <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">
2185                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2186                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2187                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2189                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2190                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2191                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2192                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2193                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2194                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2195                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2196                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2197                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2198                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2199                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2200                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2201                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2202                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2203                 </fields>
2204                 <links>
2205                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2206                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2207                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2208                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2209                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2210                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2211                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2212                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2213                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2214                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2215                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2216                 </links>
2217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218             <actions>
2219                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2220                 <retrieve/>
2221                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2222                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2223             </actions>
2224         </permacrud>
2225         </class>
2226         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2228                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2229                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2230                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2231                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2232                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2233                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2234                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2235                 </fields>
2236                 <links>
2237                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2238                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2239         </links>
2240         </class>
2241         <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">
2242                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2243                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2244                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2245                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2246                 </fields>
2247                 <links>
2248                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2249                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2250                 </links>
2251         </class>
2252         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2253                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2254                         <field name="id" reporter:datatype="id" />
2255                         <field name="value" oils_persist:i18n="true" />
2256                 </fields>
2257                 <links/>
2258         </class>
2259         <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">
2260                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2261                         <field name="balance_owed" reporter:datatype="money" />
2262                         <field name="total_owed" reporter:datatype="money" />
2263                         <field name="total_paid" reporter:datatype="money" />
2264                         <field name="usr" reporter:datatype="link"/>
2265                 </fields>
2266                 <links>
2267                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2268         </links>
2269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2270             <actions>
2271                 <retrieve permission="VIEW_USER">
2272                     <context link="usr" field="home_ou"/>
2273                 </retrieve>
2274             </actions>
2275         </permacrud>
2276         </class>
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2279                         <field name="collector" />
2280                         <field name="enter_time" reporter:datatype="timestamp"/>
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="location" reporter:datatype="link"/>
2283                         <field name="usr" reporter:datatype="link"/>
2284                 </fields>
2285                 <links>
2286                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2287                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2288                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2289                 </links>
2290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2291             <actions>
2292                 <create permission="money.collections_tracker.create" context_field="location"/>
2293                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2294                 <delete permission="money.collections_tracker.create" context_field="location"/>
2295             </actions>
2296         </permacrud>
2297         </class>
2298         <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">
2299                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2300                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2301                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2302                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2303                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2304                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2305                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2306                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2307                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2308                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2309                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2310                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2311                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2312                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2313                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2314                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2315                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2316                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2317                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2318                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2319                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2320                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2321                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2322                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2324                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2325                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2326                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2327                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2328                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2329                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2332                 </fields>
2333                 <links>
2334                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2335                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2336                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2337                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2338                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2339                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2340                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2341                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2342                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2343                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2344                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2345                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2346                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2347                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2348                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2349                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2350                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2351                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2352                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2353                 </links>
2354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2355             <actions>
2356                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2357                 <retrieve/>
2358                 <update permission="UPDATE_MARC" global_required="true"/>
2359             </actions>
2360         </permacrud>
2361         </class>
2362         <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">
2363                 <fields oils_persist:primary="id">
2364                         <field name="dow_0_close" />
2365                         <field name="dow_0_open" />
2366                         <field name="dow_1_close" />
2367                         <field name="dow_1_open" />
2368                         <field name="dow_2_close" />
2369                         <field name="dow_2_open" />
2370                         <field name="dow_3_close" />
2371                         <field name="dow_3_open" />
2372                         <field name="dow_4_close" />
2373                         <field name="dow_4_open" />
2374                         <field name="dow_5_close" />
2375                         <field name="dow_5_open" />
2376                         <field name="dow_6_close" />
2377                         <field name="dow_6_open" />
2378                         <field name="id" reporter:datatype="id" />
2379                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2380                 </fields>
2381                 <links>
2382                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2383                 </links>
2384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2385             <actions>
2386                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2387                 <retrieve/>
2388                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2389                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2390             </actions>
2391         </permacrud>
2392         </class>
2393         <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">
2394                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2395                         <field name="id" reporter:datatype="id" />
2396                         <field name="record" reporter:datatype="link"/>
2397                         <field name="label" reporter:datatype="text"/>
2398                         <field name="label_sortkey" reporter:datatype="text"/>
2399                 </fields>
2400                 <links>
2401                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2402                 </links>
2403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2404             <actions>
2405                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2406                 <retrieve/>
2407                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2408                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2409             </actions>
2410         </permacrud>
2411         </class>
2412         <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">
2413                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2414                         <field name="id" reporter:datatype="id" />
2415                         <field name="target_copy" reporter:datatype="link" />
2416                         <field name="part" reporter:datatype="link"/>
2417                 </fields>
2418                 <links>
2419                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2420                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2421                 </links>
2422         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2423             <actions>
2424                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2425                 <retrieve/>
2426                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2427                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2428             </actions>
2429         </permacrud>
2430         </class>
2431         <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">
2432                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2433                         <field name="close_end" reporter:datatype="timestamp" />
2434                         <field name="close_start" reporter:datatype="timestamp" />
2435                         <field name="id" reporter:datatype="id" />
2436                         <field name="org_unit" reporter:datatype="org_unit"/>
2437                         <field name="reason" reporter:datatype="text"/>
2438                 </fields>
2439                 <links>
2440                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2441                 </links>
2442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2443             <actions>
2444                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2445                 <retrieve/>
2446                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2447                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2448             </actions>
2449         </permacrud>
2450         </class>
2451         <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">
2452                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2453                         <field name="extended" reporter:datatype="interval"/>
2454                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2455                         <field name="max_renewals" reporter:datatype="int" />
2456                         <field name="name" reporter:datatype="text"/>
2457                         <field name="normal" reporter:datatype="interval"/>
2458                         <field name="shrt" reporter:datatype="interval"/>
2459                 </fields>
2460                 <links>
2461                 </links>
2462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2463             <actions>
2464                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2465                 <retrieve/>
2466                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2467                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471
2472         <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">
2473                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2474                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2475                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2476             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2477                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2478             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2479                 </fields>
2480                 <links>
2481             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2482                 </links>
2483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2484             <actions>
2485                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2486                 <retrieve/>
2487                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2488                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2489             </actions>
2490                 </permacrud>
2491         </class>
2492
2493         <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">
2494                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2496                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2497                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2498             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2499                 </fields>
2500                 <links>
2501                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2502                 </links>
2503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2504             <actions>
2505                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2506                 <retrieve/>
2507                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2508                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2509             </actions>
2510                 </permacrud>
2511         </class>
2512
2513         <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">
2514                 <fields oils_persist:primary="id" oils_persist:sequence="">
2515                         <field name="balance_owed" reporter:datatype="money"/>
2516                         <field name="id" reporter:datatype="id" />
2517                         <field name="last_billing_note" reporter:datatype="text"/>
2518                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2519                         <field name="last_billing_type" reporter:datatype="text"/>
2520                         <field name="last_payment_note" reporter:datatype="text"/>
2521                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2522                         <field name="last_payment_type" reporter:datatype="text"/>
2523                         <field name="total_owed" reporter:datatype="money"/>
2524                         <field name="total_paid" reporter:datatype="money"/>
2525                         <field name="usr" reporter:datatype="link"/>
2526                         <field name="xact_finish" reporter:datatype="timestamp" />
2527                         <field name="xact_start" reporter:datatype="timestamp" />
2528                         <field name="xact_type" reporter:datatype="text"/>
2529                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2530                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2531                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2532                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2533                         <field name="billing_location" reporter:datatype="link"/>
2534                 </fields>
2535                 <links>
2536                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2537                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2538                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2539                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2540                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
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" global_required='true'/>
3420                                 <retrieve />
3421                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3422                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
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" global_required='true'/>
3452                                 <retrieve />
3453                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3454                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
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" global_required='true'/>
3478                                 <retrieve />
3479                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3480                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
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" global_required='true'/>
3503                                 <retrieve />
3504                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3505                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
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" global_required='true'/>
3525                                 <retrieve />
3526                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3527                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3528                         </actions>
3529                 </permacrud>
3530         </class>
3531         
3532         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3533                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3534                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3535                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3536                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3537                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3538                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3539                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3540                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3541                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3542                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3543                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3544                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3545                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3546                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3547                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3548                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3549                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3550                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3551                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3552                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3553                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3554                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3555                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3556                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3557                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3558                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3559                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3560                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3561                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3562                 </fields>
3563                 <links>
3564                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3565                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3566                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3567                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3568                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3569                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3570                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3571                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3572                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3573                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3574                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3575                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3576                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3577                 </links>
3578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3579                         <actions>
3580                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3581                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3582                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3583                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3584                         </actions>
3585                 </permacrud>
3586         </class>
3587         
3588         <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">
3589                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3590                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3591                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3592                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3593                 </fields>
3594                 <links>
3595                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3596                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3597                 </links>
3598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3599                         <actions>
3600                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3601                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3602                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3603                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3604                         </actions>
3605                 </permacrud>
3606         </class>
3607
3608         <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">
3609                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3610                         <field name="bucket" reporter:datatype="link"/>
3611                         <field name="id" reporter:datatype="id" />
3612                         <field name="target_call_number" reporter:datatype="link" />
3613                         <field name="create_time" reporter:datatype="timestamp" />
3614                         <field name="pos" reporter:datatype="int" />
3615                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3616                 </fields>
3617                 <links>
3618                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3619                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3620             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3621                 </links>
3622         </class>
3623         <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">
3624                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3625                         <field name="id" reporter:datatype="id" />
3626                         <field name="item" reporter:datatype="link"/>
3627                         <field name="note" reporter:datatype="text" />
3628                 </fields>
3629                 <links>
3630                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3631                 </links>
3632         </class>
3633         <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">
3634                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3635                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field name="btype" reporter:datatype="text"/>
3637                         <field name="id" reporter:datatype="id" />
3638                         <field name="name" reporter:datatype="text"/>
3639                         <field name="owner" reporter:datatype="link"/>
3640                         <field name="pub" reporter:datatype="bool"/>
3641                         <field name="create_time" reporter:datatype="timestamp" />
3642                 </fields>
3643                 <links>
3644                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3645                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3646                 </links>
3647         </class>
3648         <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">
3649                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3650                         <field name="id" reporter:datatype="id" />
3651                         <field name="bucket" reporter:datatype="link"/>
3652                         <field name="note" reporter:datatype="text" />
3653                 </fields>
3654                 <links>
3655                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3656                 </links>
3657         </class>
3658         <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">
3659                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3660                         <field name="hold" reporter:datatype="link"/>
3661                         <field name="id" reporter:datatype="id" />
3662                         <field name="target_copy" reporter:datatype="link"/>
3663                 </fields>
3664                 <links>
3665                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3666                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3667                 </links>
3668         </class>
3669         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3670                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3671                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3672                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3673                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3674                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3675                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3676                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3677                 </fields>
3678                 <links>
3679                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3680                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3681                 </links>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3685                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3686                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3687                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3688                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3689                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3690                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3691                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3692                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3693                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3695                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3696                 </fields>
3697                 <links>
3698                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3699                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3700                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3701                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3702                 </links>
3703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3704             <actions>
3705                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3706                 <retrieve/>
3707                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3708                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3709             </actions>
3710         </permacrud>
3711         </class>
3712
3713     <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">
3714         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3715             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3716             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3717             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3718             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3719         </fields>
3720         <links>
3721             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3722             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3723         </links>
3724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3725             <actions>
3726                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3727                 <retrieve/>
3728                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3729                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3730             </actions>
3731         </permacrud>
3732     </class>
3733
3734         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3735                 <fields>
3736                         <field name="sre_id" oils_persist:virtual="true" />
3737                         <field name="location" oils_persist:virtual="true" />
3738                         <field name="owning_lib" oils_persist:virtual="true" />
3739                         <field name="basic_holdings" oils_persist:virtual="true" />
3740                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3741                         <field name="supplement_holdings" oils_persist:virtual="true" />
3742                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3743                         <field name="index_holdings" oils_persist:virtual="true" />
3744                         <field name="index_holdings_add" oils_persist:virtual="true" />
3745                         <field name="online" oils_persist:virtual="true" />
3746                         <field name="missing" oils_persist:virtual="true" />
3747                         <field name="incomplete" oils_persist:virtual="true" />
3748                 </fields>
3749         </class>
3750
3751         <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">
3752                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3753                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3754                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3755                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3756                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3757                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3758                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3759                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3760                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3761                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3762                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3763                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3764                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3765                 </fields>
3766                 <links>
3767                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3768                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3769                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3770                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3771                 </links>
3772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3773                         <actions>
3774                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3775                                 <retrieve/>
3776                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3777                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3778                         </actions>
3779                 </permacrud>
3780         </class>
3781
3782         <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">
3783                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3784                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3785                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3786                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3787                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3788                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3789                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3790                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3791                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3792                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3793                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3794                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3795                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3796                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3797                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3798                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3799                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3800                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3801                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3802                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3803                 </fields>
3804                 <links>
3805                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3806                 </links>
3807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808                         <actions>
3809                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3810                                         <context link="subscription" field="owning_lib" />
3811                                 </create>
3812                                 <retrieve />
3813                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3814                                         <context link="subscription" field="owning_lib" />
3815                                 </update>
3816                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3817                                         <context link="subscription" field="owning_lib" />
3818                                 </delete>
3819                         </actions>
3820                 </permacrud>
3821         </class>
3822
3823         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3826                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3827                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3828                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3829                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3830                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3831                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3832                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3833                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3834                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3835                 </fields>
3836                 <links>
3837                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3838                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3839                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3840                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3841                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3842                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3843                 </links>
3844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3845                         <actions>
3846                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3847                                 <retrieve />
3848                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3849                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3850                         </actions>
3851                 </permacrud>
3852         </class>
3853
3854         <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">
3855                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3856                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3857                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3858                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3859                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3860                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3861                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3862                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3863                 </fields>
3864                 <links>
3865                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3866                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3867                 </links>
3868                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3869                 </permacrud>
3870         </class>
3871
3872         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3873                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3874                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3875                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3876                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3877                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3878                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3879                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3880                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3881                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3882                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3883                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3884                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3885                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3886                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3887                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3888                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3889                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3890                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3891                 </fields>
3892                 <links>
3893                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3894                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3895                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3896                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3897                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3898                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3899                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3900                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3901                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3902                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3903                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3904                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3905                 </links>
3906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3907                         <actions>
3908                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3909                                 <retrieve />
3910                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3911                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3912                         </actions>
3913                 </permacrud>
3914         </class>
3915
3916         <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">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3918                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3919                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3920                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3921                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3922                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3923                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3924                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3925                 </fields>
3926                 <links>
3927                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3928                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3929                 </links>
3930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3931                         <actions>
3932                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3933                                         <context link="distribution" field="holding_lib" />
3934                                 </create>
3935                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3936                                         <context link="distribution" field="holding_lib" />
3937                                 </retrieve>
3938                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3939                                         <context link="distribution" field="holding_lib" />
3940                                 </update>
3941                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3942                                         <context link="distribution" field="holding_lib" />
3943                                 </delete>
3944                         </actions>
3945                 </permacrud>
3946         </class>
3947
3948         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3949                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3950                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3951                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3952                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3953                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3954                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3955                 </fields>
3956                 <links>
3957                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3958                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3959                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3960                 </links>
3961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3962                         <actions>
3963                                 <create permission="ADMIN_SERIAL_STREAM">
3964                                         <context link="distribution" field="holding_lib" />
3965                                 </create>
3966                                 <retrieve />
3967                                 <update permission="ADMIN_SERIAL_STREAM">
3968                                         <context link="distribution" field="holding_lib" />
3969                                 </update>
3970                                 <delete permission="ADMIN_SERIAL_STREAM">
3971                                         <context link="distribution" field="holding_lib" />
3972                                 </delete>
3973                         </actions>
3974                 </permacrud>
3975         </class>
3976
3977         <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">
3978                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3980                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3981                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3982                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3983                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3984                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3985                 </fields>
3986                 <links>
3987                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3988                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3989                 </links>
3990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3991                         <actions>
3992                                 <create permission="ADMIN_SERIAL_STREAM">
3993                                         <context link="stream" jump="distribution" field="holding_lib" />
3994                                 </create>
3995                                 <retrieve permission="RECEIVE_SERIAL">
3996                                         <context link="stream" jump="distribution" field="holding_lib" />
3997                                 </retrieve>
3998                                 <update permission="ADMIN_SERIAL_STREAM">
3999                                         <context link="stream" jump="distribution" field="holding_lib" />
4000                                 </update>
4001                                 <delete permission="ADMIN_SERIAL_STREAM">
4002                                         <context link="stream" jump="distribution" field="holding_lib" />
4003                                 </delete>
4004                         </actions>
4005                 </permacrud>
4006         </class>
4007
4008         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4009                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4010                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4011                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4012                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4013                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4014                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4015                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4016                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4017                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4018                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4019                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4020                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4021                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4022                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4023                 </fields>
4024                 <links>
4025                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4026                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4027                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4028                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4029                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4030                 </links>
4031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4032                         <actions>
4033                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4034                                         <context link="subscription" field="owning_lib" />
4035                                 </create>
4036                                 <retrieve/>
4037                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4038                                         <context link="subscription" field="owning_lib" />
4039                                 </update>
4040                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4041                                         <context link="subscription" field="owning_lib" />
4042                                 </delete>
4043                         </actions>
4044                 </permacrud>
4045         </class>
4046
4047         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4048                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4049                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4050                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4051                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4052                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4053                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4054                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4055                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4056                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4057                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4058                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4059                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4060                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4061                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4062                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4063                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4064                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4065                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4066                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4067                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4068                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4070                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4071                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4072                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4073                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4074                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4075                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4076                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4077                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4078                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4080                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4081                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4082                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4083                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4084                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4085                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4088                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4089                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4090                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4091                 </fields>
4092                 <links>
4093                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4094                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4095                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4096                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4097                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4098                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4099                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4100                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4101                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4102                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4103                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4104                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4105                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4106                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4107                 </links>
4108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4109                         <actions>
4110                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4111                                 <retrieve/>
4112                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4113                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4114                         </actions>
4115                 </permacrud>
4116         </class>
4117
4118         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4119                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4120                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4121                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4122                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4123                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4125                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4126                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4127                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4128                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4129                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4130                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4131                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4132                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4133                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4134                 </fields>
4135                 <links>
4136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4137                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4138                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4139                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4140                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4141                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4142                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4143                 </links>
4144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4145                         <actions>
4146                                 <create permission="ADMIN_SERIAL_ITEM">
4147                                         <context link="stream" jump="distribution" field="holding_lib" />
4148                                 </create>
4149                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4150                                         <context link="stream" jump="distribution" field="holding_lib" />
4151                                 </retrieve>
4152                                 <update permission="ADMIN_SERIAL_ITEM">
4153                                         <context link="stream" jump="distribution" field="holding_lib" />
4154                                 </update>
4155                                 <delete permission="ADMIN_SERIAL_ITEM">
4156                                         <context link="stream" jump="distribution" field="holding_lib" />
4157                                 </delete>
4158                         </actions>
4159                 </permacrud>
4160         </class>
4161
4162         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4163                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4164                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4165                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4166                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4167                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4168                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4169                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4170                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4171                 </fields>
4172                 <links>
4173                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4174                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4175                 </links>
4176                 <!-- Not available via PCRUD at this time -->
4177         </class>
4178
4179         <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">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4181                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4182                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4183                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4184                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4185                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4186                 </fields>
4187                 <links>
4188                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4189                 </links>
4190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4191                         <actions>
4192                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4193                                         <context link="distribution" field="holding_lib" />
4194                                 </create>
4195                                 <retrieve/>
4196                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4197                                         <context link="distribution" field="holding_lib" />
4198                                 </update>
4199                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4200                                         <context link="distribution" field="holding_lib" />
4201                                 </create>
4202                         </actions>
4203                 </permacrud>
4204         </class>
4205
4206         <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">
4207                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4208                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4209                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4210                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4211                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4212                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4213                 </fields>
4214                 <links>
4215                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4216                 </links>
4217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4218                         <actions>
4219                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4220                                         <context link="distribution" field="holding_lib" />
4221                                 </create>
4222                                 <retrieve/>
4223                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4224                                         <context link="distribution" field="holding_lib" />
4225                                 </update>
4226                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4227                                         <context link="distribution" field="holding_lib" />
4228                                 </create>
4229                         </actions>
4230                 </permacrud>
4231         </class>
4232
4233         <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">
4234                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4235                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4236                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4237                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4238                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4239                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4240                 </fields>
4241                 <links>
4242                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4243                 </links>
4244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4245                         <actions>
4246                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4247                                         <context link="distribution" field="holding_lib" />
4248                                 </create>
4249                                 <retrieve/>
4250                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4251                                         <context link="distribution" field="holding_lib" />
4252                                 </update>
4253                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4254                                         <context link="distribution" field="holding_lib" />
4255                                 </create>
4256                         </actions>
4257                 </permacrud>
4258         </class>
4259
4260         <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">
4261                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4262                         <field name="id" reporter:datatype="id" />
4263                         <field name="owning_copy" reporter:datatype="link"/>
4264                         <field name="stat_cat" reporter:datatype="link"/>
4265                         <field name="stat_cat_entry" reporter:datatype="link"/>
4266                 </fields>
4267                 <links>
4268                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4269                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4270                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4271                 </links>
4272         </class>
4273         <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">
4274                 <fields oils_persist:primary="code">
4275                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4276                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4277                 </fields>
4278                 <links/>
4279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4280             <actions>
4281                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4282                 <retrieve/>
4283                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4284                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4285             </actions>
4286         </permacrud>
4287         </class>
4288         <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">
4289                 <fields oils_persist:primary="code">
4290                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4291                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4292                 </fields>
4293                 <links/>
4294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4295             <actions>
4296                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4297                 <retrieve/>
4298                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4299                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4300             </actions>
4301         </permacrud>
4302         </class>
4303         <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">
4304                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4305                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4306                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4307                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4308                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4309                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4310                 </fields>
4311                 <links>
4312             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4313         </links>
4314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4315             <actions>
4316                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4317                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4318                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4319                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4320             </actions>
4321         </permacrud>
4322         </class>
4323         <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">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4325                         <field name="id" reporter:datatype="id" />
4326                         <field name="name" reporter:datatype="text"/>
4327                 </fields>
4328                 <links/>
4329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4330             <actions>
4331                 <create permission="CREATE_LASSO" global_required="true"/>
4332                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4333                 <update permission="UPDATE_LASSO" global_required="true"/>
4334                 <delete permission="DELETE_LASSO" global_required="true"/>
4335             </actions>
4336         </permacrud>
4337         </class>
4338         <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">
4339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4340                         <field name="id" reporter:datatype="id" />
4341                         <field name="lasso" reporter:datatype="link"/>
4342                         <field name="org_unit" reporter:datatype="org_unit"/>
4343                 </fields>
4344                 <links>
4345                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4346                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4347                 </links>
4348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4349             <actions>
4350                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4351                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4352                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4353                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4354             </actions>
4355         </permacrud>
4356         </class>
4357         <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">
4358                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4359                         <field name="id" reporter:datatype="id" />
4360                         <field name="from_org" reporter:datatype="org_unit"/>
4361                         <field name="to_org" reporter:datatype="org_unit"/>
4362                         <field name="prox" reporter:datatype="int" />
4363                 </fields>
4364                 <links>
4365                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4366                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4367                 </links>
4368         </class>
4369         <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">
4370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4371                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4372                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4373                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4374                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4375                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4376                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4377                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4378                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4379                 </fields>
4380                 <links/>
4381         </class>
4382         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4384                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4385                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4386                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4387                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4388                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4389                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4390                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4391                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4392                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4393                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4394                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4395                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4396                 </fields>
4397                 <links>
4398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4399                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4400                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4401                 </links>
4402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4403             <actions>
4404                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4405                 <retrieve/>
4406                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4407                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4408             </actions>
4409         </permacrud>
4410         </class>
4411         <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">
4412                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4413                         <field name="address_type"  reporter:datatype="text"/>
4414                         <field name="city"  reporter:datatype="text"/>
4415                         <field name="country"  reporter:datatype="text"/>
4416                         <field name="county"  reporter:datatype="text"/>
4417                         <field name="id" reporter:datatype="id" />
4418                         <field name="org_unit" reporter:datatype="org_unit"/>
4419                         <field name="post_code"  reporter:datatype="text"/>
4420                         <field name="state"  reporter:datatype="text"/>
4421                         <field name="street1"  reporter:datatype="text"/>
4422                         <field name="street2"  reporter:datatype="text"/>
4423                         <field name="valid" reporter:datatype="bool"/>
4424                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4425                 </fields>
4426                 <links>
4427                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4428                 </links>
4429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4430             <actions>
4431                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4432                 <retrieve/>
4433                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4434                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4435             </actions>
4436         </permacrud>
4437         </class>
4438         <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">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4440                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4441                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4442                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4443                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4444                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4445                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4446                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4447                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4448                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4450                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4451                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4452                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4453                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4454                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4455                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4456                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4457                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4458                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4459                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4460                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4461                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4462                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4463                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4464                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4465                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4466                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4467                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4468                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4469                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4470                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4471                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4472                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4473                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4474                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4475                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4476                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4477                 </fields>
4478                 <links>
4479                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4480                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4481                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4482                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4483                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4484                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4485                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4486                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4487                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4488                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4489                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4490                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4491                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4492                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4493                 </links>
4494         </class>
4495         <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">
4496                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4497                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4498                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4499                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4500                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4501                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4502                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4503                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4504                 </fields>
4505                 <links>
4506                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4507                 </links>
4508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4509                         <actions>
4510                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4511                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4512                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4513                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4514                         </actions>
4515                 </permacrud>
4516         </class>
4517         <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">
4518                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4519                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4520                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4521                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4522                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4523                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4524                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4525                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4526                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4527                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4528                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4529                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4530                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4531                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4532                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4533                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4534                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4535                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4538                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4539                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4540                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4541                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4542                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4543                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4544                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4545                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4546                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4547                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4548                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4549                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4550                 </fields>
4551                 <links>
4552                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4553                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4554                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4555                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4556                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4557                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4558                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4559                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4560                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4561                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4562                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4563                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4564                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4565                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4566                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4567                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4568                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4569                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4570                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4571                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4572                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4573                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4574                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4575                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4576                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4577                 </links>
4578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4579             <actions>
4580                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4581                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4582                     <context field="id"/>
4583                     <context field="parent_ou"/>
4584                                 </retrieve>
4585                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4586                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4587             </actions>
4588         </permacrud>
4589         </class>
4590         <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">
4591                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4592                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4593                         <field name="btype" reporter:datatype="text"/>
4594                         <field name="id" reporter:datatype="id" />
4595                         <field name="name"  reporter:datatype="text"/>
4596                         <field name="owner" reporter:datatype="link"/>
4597                         <field name="pub" reporter:datatype="bool"/>
4598                         <field name="create_time" reporter:datatype="timestamp" />
4599                 </fields>
4600                 <links>
4601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4602                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4603                 </links>
4604         </class>
4605         <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">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4607                         <field name="id" reporter:datatype="id" />
4608                         <field name="bucket" reporter:datatype="link"/>
4609                         <field name="note" reporter:datatype="text" />
4610                 </fields>
4611                 <links>
4612                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4613                 </links>
4614         </class>
4615         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4616                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4617                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4618                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4619                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4620                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4621                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4622                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4623                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4624                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4625                 </fields>
4626                 <links>
4627                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4629                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4630                 </links>
4631         </class>
4632         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4633                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4634                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4635                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4636                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4637                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4638                 </fields>
4639                 <links>
4640                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4641                 </links>
4642         </class>
4643     <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">
4644         <fields oils_persist:primary="field">
4645             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4646             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4647             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4648         </fields>
4649         <links/>
4650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4651             <actions>
4652                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4653                 <retrieve />
4654                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4655                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4656             </actions>
4657         </permacrud>
4658     </class>
4659         <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">
4660                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4661                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4662                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4663                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4664                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4665                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4666                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4667                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4668                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4669                 </fields>
4670                 <links>
4671                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4672                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4673                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4674                 </links>
4675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4676             <actions>
4677                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4678                 <retrieve />
4679                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4680                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4681             </actions>
4682         </permacrud>
4683         </class>
4684         <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">
4685                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4686                         <field name="field" reporter:datatype="link"/>
4687                         <field name="id" reporter:datatype="id" />
4688                         <field name="source" reporter:datatype="link"/>
4689                         <field name="value"  reporter:datatype="text"/>
4690                 </fields>
4691                 <links>
4692                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4693                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4694                 </links>
4695         </class>
4696         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4697                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4698                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4699                         <field name="btype" reporter:datatype="text"/>
4700                         <field name="id" reporter:datatype="id" />
4701                         <field name="name"  reporter:datatype="text"/>
4702                         <field name="owner" reporter:datatype="link"/>
4703                         <field name="pub" reporter:datatype="bool"/>
4704                         <field name="create_time" reporter:datatype="timestamp" />
4705                 </fields>
4706                 <links>
4707                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4708                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4709                 </links>
4710         </class>
4711         <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">
4712                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4713                         <field name="id" reporter:datatype="id" />
4714                         <field name="bucket" reporter:datatype="link"/>
4715                         <field name="note" reporter:datatype="text" />
4716                 </fields>
4717                 <links>
4718                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4719                 </links>
4720         </class>
4721         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4722                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4723                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4724                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4725                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4726                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4727                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4728                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4729                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4730                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4731                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4732                 </fields>
4733                 <links>
4734                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4735                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4736                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4737                 </links>
4738         </class>
4739         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4740                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4741                         <field name="id" reporter:datatype="id" />
4742                         <field name="ind1" />
4743                         <field name="ind2" />
4744                         <field name="record" />
4745                         <field name="subfield" />
4746                         <field name="tag" />
4747                         <field name="value" />
4748                 </fields>
4749                 <links>
4750                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4751                 </links>
4752         </class>
4753         <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">
4754                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4755                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4756                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4757                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4758                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4759                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4760                 </fields>
4761                 <links>
4762                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4763                 </links>
4764         </class>
4765         <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">
4766                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4767                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4768                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4769                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4770                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4771                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4772                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4773                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4774                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4775                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4776                 </fields>
4777                 <links>
4778                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4779                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4780                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4781                 </links>
4782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4783             <actions>
4784                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4785                 <retrieve/>
4786                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4787                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4788             </actions>
4789         </permacrud>
4790         </class>
4791         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4792                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4793                         <field name="create_date" reporter:datatype="timestamp"/>
4794                         <field name="creator" reporter:datatype="link"/>
4795                         <field name="edit_date" reporter:datatype="timestamp"/>
4796                         <field name="editor" reporter:datatype="link"/>
4797                         <field name="id" reporter:datatype="id" />
4798                         <field name="pub" reporter:datatype="bool"/>
4799                         <field name="record" reporter:datatype="link"/>
4800                         <field name="value"  reporter:datatype="text"/>
4801                 </fields>
4802                 <links>
4803                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4804                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4805                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4806                 </links>
4807         </class>
4808         <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">
4809                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4810                         <field name="balance_owed" reporter:datatype="money" />
4811                         <field name="total_owed" reporter:datatype="money" />
4812                         <field name="total_paid" reporter:datatype="money" />
4813                         <field name="usr" reporter:datatype="link"/>
4814                 </fields>
4815                 <links>
4816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4817                 </links>
4818         </class>
4819         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4821                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4822                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4823                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4824                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4825                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4826                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4827                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4828                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4829                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4830                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4831                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4832                 </fields>
4833                 <links>
4834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4835                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4836                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4837                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4838                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4839                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4840                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4841                 </links>
4842         </class>
4843         <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">
4844                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4845                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4846                         <field name="quality" reporter:datatype="int" />
4847                         <field name="source" reporter:datatype="text"/>
4848                         <field name="transcendant" reporter:datatype="bool"/>
4849                 </fields>
4850                 <links/>
4851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4852             <actions>
4853                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4854                 <retrieve/>
4855                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4856                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4857             </actions>
4858         </permacrud>
4859         </class>
4860         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4861                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4862                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4863                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4864                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4865                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4866                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4867                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4869                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4870                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4871                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4872                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4873                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4874                 </fields>
4875                 <links>
4876                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4877                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4878                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4879                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4880                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4881                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4882                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4883                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4884                 </links>
4885         </class>
4886         <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">
4887                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4888                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4889                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4890                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4891                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4892                 </fields>
4893                 <links>
4894                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4895                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4896                 </links>
4897         </class>
4898         <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">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4900                         <field name="bucket" reporter:datatype="link"/>
4901                         <field name="id" reporter:datatype="id" />
4902                         <field name="target_user" reporter:datatype="link"/>
4903                         <field name="create_time" reporter:datatype="timestamp" />
4904                         <field name="pos" reporter:datatype="int" />
4905                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4906                 </fields>
4907                 <links>
4908                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4909                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4910             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4911                 </links>
4912         </class>
4913         <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">
4914                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4915                         <field name="id" reporter:datatype="id" />
4916                         <field name="item" reporter:datatype="link"/>
4917                         <field name="note" reporter:datatype="text" />
4918                 </fields>
4919                 <links>
4920                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4921                 </links>
4922         </class>
4923         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4924                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4925                         <field name="balance_owed" reporter:datatype="money" />
4926                         <field name="total_owed" reporter:datatype="money" />
4927                         <field name="total_paid" reporter:datatype="money" />
4928                         <field name="usr" reporter:datatype="link"/>
4929                 </fields>
4930                 <links>
4931                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4932                 </links>
4933         </class>
4934         <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">
4935                 <fields oils_persist:primary="code" oils_persist:sequence="">
4936                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4937                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4938                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4939                 </fields>
4940                 <links/>
4941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4942             <actions>
4943                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4944                 <retrieve/>
4945                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4946                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4947             </actions>
4948         </permacrud>
4949         </class>
4950         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4951                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4952                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4953                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4954                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4955                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4956                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4957                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4958                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4959                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4960                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4961                 </fields>
4962                 <links>
4963                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4964                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4965                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4966                 </links>
4967         </class>
4968         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4969                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4970                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4971                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4972                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4973                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4974                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4975                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4976                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4977                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4978                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4979                 </fields>
4980                 <links>
4981                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4982                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4983                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4984                 </links>
4985         </class>
4986         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4987                 <fields oils_persist:primary="id" oils_persist:sequence="">
4988                         <field name="checkin_lib" reporter:datatype="link"/>
4989                         <field name="checkin_staff" reporter:datatype="link"/>
4990                         <field name="checkin_time" reporter:datatype="timestamp"/>
4991                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4992                         <field name="circ_staff" reporter:datatype="link"/>
4993                         <field name="desk_renewal" reporter:datatype="bool"/>
4994                         <field name="due_date" reporter:datatype="timestamp"/>
4995                         <field name="duration" reporter:datatype="interval"/>
4996                         <field name="duration_rule" reporter:datatype="link"/>
4997                         <field name="fine_interval" reporter:datatype="interval"/>
4998                         <field name="id" reporter:datatype="id" />
4999                         <field name="max_fine" reporter:datatype="money" />
5000                         <field name="max_fine_rule" reporter:datatype="link"/>
5001                         <field name="opac_renewal" reporter:datatype="bool"/>
5002                         <field name="phone_renewal" reporter:datatype="bool"/>
5003                         <field name="recurring_fine" reporter:datatype="money" />
5004                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5005                         <field name="renewal_remaining" reporter:datatype="int" />
5006             <field name="grace_period" reporter:datatype="interval" />
5007                         <field name="stop_fines" reporter:datatype="text"/>
5008                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5009                         <field name="target_copy" reporter:datatype="link"/>
5010                         <field name="usr" reporter:datatype="link"/>
5011                         <field name="xact_finish" reporter:datatype="timestamp" />
5012                         <field name="xact_start" reporter:datatype="timestamp" />
5013                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5014                 </fields>
5015                 <links>
5016                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5017                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5018                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5019                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5020                 </links>
5021         </class>
5022         <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">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5024                         <field name="field" reporter:datatype="link"/>
5025                         <field name="id" reporter:datatype="id" />
5026                         <field name="source" reporter:datatype="link"/>
5027                         <field name="value" reporter:datatype="text"/>
5028                 </fields>
5029                 <links>
5030                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5031                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5032                 </links>
5033         </class>
5034         <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">
5035                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5036                         <field name="high" reporter:datatype="money" />
5037                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5038                         <field name="low" reporter:datatype="money" />
5039                         <field name="name" reporter:datatype="text"/>
5040                         <field name="normal" reporter:datatype="money" />
5041                         <field name="recurrence_interval" reporter:datatype="interval"/>
5042             <field name="grace_period" reporter:datatype="interval" />
5043                 </fields>
5044                 <links/>
5045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5046             <actions>
5047                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5048                 <retrieve/>
5049                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5050                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5051             </actions>
5052         </permacrud>
5053         </class>
5054         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5055                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5056                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5057                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5058                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5059                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5060                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5061                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5062                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5063                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5064                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5065                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5066                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5067                 </fields>
5068                 <links>
5069                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5070                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5071                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5072                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5073                 </links>
5074         </class>
5075         <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">
5076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5077                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5078                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5079                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5080                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5081                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5082                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5083                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5084                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5085                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5086                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5087                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5088                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5089                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5090                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5091                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5092                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5093                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5094                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5095                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5097                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5098                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5099                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5100                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5101                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5102                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5103                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5104                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5105                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5106                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5107                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5108                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5109                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5110                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5111                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5112                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5113                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5114                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5115                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5116                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5117                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5118                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5119                 </fields>
5120                 <links>
5121                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5122                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5123                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5124                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5125                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5126                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5127                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5128                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5129                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5130                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5131                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5132                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5133                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5134                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5135                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5136                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5137                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5138                 </links>
5139         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5140             <actions>
5141                 <create permission="CREATE_COPY">
5142                     <context link="call_number" field="owning_lib"/>
5143                 </create>
5144                 <retrieve/>
5145                 <update permission="UPDATE_COPY">
5146                     <context link="call_number" field="owning_lib"/>
5147                 </update>
5148                 <delete permission="DELETE_COPY">
5149                     <context link="call_number" field="owning_lib"/>
5150                 </delete>
5151             </actions>
5152         </permacrud>
5153         </class>
5154
5155         <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">
5156                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5157                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5158                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5159                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5160                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5161                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5163                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5164                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5165                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5166                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5167                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5168                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5169                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5170                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5171                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5172                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5173                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5174                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5175                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5176                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5177                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5178                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5179                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5180                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5181                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5182                 </fields>
5183                 <links>
5184                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5186                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5187                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5188                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5189                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5190                 </links>
5191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5192                         <actions>
5193                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5194                                 <retrieve />
5195                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5196                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5197                         </actions>
5198                 </permacrud>
5199         </class>
5200
5201         <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">
5202                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5203                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5204                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5205                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5206                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5207                 </fields>
5208                 <links/>
5209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5210             <actions>
5211                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5212                 <retrieve/>
5213                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5214                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5215             </actions>
5216         </permacrud>
5217         </class>
5218         <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">
5219                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5220                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5221                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5222                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5223                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5224                 </fields>
5225                 <links/>
5226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227             <actions>
5228                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5229                 <retrieve/>
5230                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5231                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5232             </actions>
5233         </permacrud>
5234         </class>
5235         <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">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5237                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5238                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5239                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5240                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5241                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5242                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5243                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5244                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5245                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5246                 </fields>
5247                 <links>
5248                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5249                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5250                 </links>
5251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5252             <actions>
5253                 <create permission="CREATE_PERM" global_required="true"/>
5254                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5255                 <update permission="UPDATE_PERM" global_required="true"/>
5256                 <delete permission="DELETE_PERM" global_required="true"/>
5257             </actions>
5258         </permacrud>
5259         </class>
5260         <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">
5261                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5262                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5264                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5265                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5266                 </fields>
5267                 <links>
5268                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5269                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5270                 </links>
5271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5272             <actions>
5273                 <create permission="ADMIN_SURVEY">
5274                     <context link="question" jump="survey" field="owner"/>
5275                 </create>
5276                 <retrieve/>
5277                 <update permission="ADMIN_SURVEY">
5278                     <context link="question" jump="survey" field="owner"/>
5279                 </update>
5280                 <delete permission="ADMIN_SURVEY">
5281                     <context link="question" jump="survey" field="owner"/>
5282                 </delete>
5283             </actions>
5284         </permacrud>
5285         </class>
5286         <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">
5287                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5288                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5289                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5290                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5291                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5292                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5293                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5294                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5295                 </fields>
5296                 <links>
5297                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5298                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5299                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5300                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5301                 </links>
5302         </class>
5303         <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">
5304                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5305                         <field name="balance_owed" reporter:datatype="money" />
5306                         <field name="total_owed" reporter:datatype="money" />
5307                         <field name="total_paid" reporter:datatype="money" />
5308                         <field name="usr" reporter:datatype="link"/>
5309                 </fields>
5310                 <links>
5311                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5312                 </links>
5313         </class>
5314         <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">
5315                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5316                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5317                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5318                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5320                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5321                 </fields>
5322                 <links>
5323                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5324                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5325                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5326                 </links>
5327         </class>
5328         <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">
5329                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5330                         <field name="field" reporter:datatype="link"/>
5331                         <field name="id" reporter:datatype="id" />
5332                         <field name="source" reporter:datatype="link"/>
5333                         <field name="value" reporter:datatype="text"/>
5334                 </fields>
5335                 <links>
5336                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5337                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5338                 </links>
5339         </class>
5340         <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">
5341                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5342                         <field name="field" reporter:datatype="link"/>
5343                         <field name="id" reporter:datatype="id" />
5344                         <field name="source" reporter:datatype="link"/>
5345                         <field name="value" reporter:datatype="text"/>
5346                 </fields>
5347                 <links>
5348                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5349                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5350                 </links>
5351         </class>
5352         <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">
5353                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5354                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5355                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5356                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5357                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5358                 </fields>
5359                 <links>
5360                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5361                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5362                 </links>
5363         </class>
5364         <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">
5365                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5366                         <field name="depth" reporter:datatype="int" />
5367                         <field name="grantable" reporter:datatype="bool"/>
5368                         <field name="grp" reporter:datatype="link"/>
5369                         <field name="id" reporter:datatype="id" />
5370                         <field name="perm" reporter:datatype="link"/>
5371                 </fields>
5372                 <links>
5373                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5374                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5375                 </links>
5376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5377             <actions>
5378                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5379                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5380                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5381                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5382             </actions>
5383         </permacrud>
5384         </class>
5385         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5386                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5387                         <field name="items" oils_persist:virtual="true" />
5388                         <field name="btype" reporter:datatype="text"/>
5389                         <field name="id" reporter:datatype="id" />
5390                         <field name="name" reporter:datatype="text"/>
5391                         <field name="owner" reporter:datatype="link"/>
5392                         <field name="pub" reporter:datatype="bool"/>
5393                         <field name="create_time" reporter:datatype="timestamp" />
5394                 </fields>
5395                 <links>
5396                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5397                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5398                 </links>
5399         </class>
5400         <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">
5401                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5402                         <field name="id" reporter:datatype="id" />
5403                         <field name="bucket" reporter:datatype="link"/>
5404                         <field name="note" reporter:datatype="text" />
5405                 </fields>
5406                 <links>
5407                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5408                 </links>
5409         </class>
5410         <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">
5411                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5412                         <field name="id" reporter:datatype="int" />
5413                         <field name="usr" reporter:datatype="link"/>
5414                         <field name="work_ou" reporter:datatype="link"/>
5415                 </fields>
5416                 <links>
5417                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5419                 </links>
5420         </class>
5421         <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">
5422                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5423                         <field name="depth" reporter:datatype="int"/>
5424                         <field name="grantable" reporter:datatype="bool"/>
5425                         <field name="id" reporter:datatype="id" />
5426                         <field name="perm" reporter:datatype="link"/>
5427                         <field name="usr" reporter:datatype="link"/>
5428                 </fields>
5429                 <links>
5430                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5431                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5432                 </links>
5433         </class>
5434         <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">
5435                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5436                         <field name="object_id" reporter:datatype="text"/>
5437                         <field name="grantable" reporter:datatype="bool"/>
5438                         <field name="id" reporter:datatype="id" />
5439                         <field name="perm" reporter:datatype="link"/>
5440                         <field name="usr" reporter:datatype="link"/>
5441                         <field name="object_type" reporter:datatype="text"/>
5442                 </fields>
5443                 <links>
5444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5445                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5446                 </links>
5447         </class>
5448         <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">
5449                 <fields oils_persist:primary="id" oils_persist:sequence="">
5450                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5451                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5452                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5453                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5454                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5455                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5456                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5457                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5460                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5461                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5462                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5463                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5464                 </fields>
5465                 <links>
5466                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5467                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5468                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5469                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5470                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5471                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5472                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5473                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5474                 </links>
5475         </class>
5476         <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">
5477                 <fields oils_persist:primary="id" oils_persist:sequence="">
5478                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5479                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5480                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5481                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5482                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5483                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5484                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5485                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5486                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5487                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5488                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5489                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5490                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5491                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5492                 </fields>
5493                 <links>
5494                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5495                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5496                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5497                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5498                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5499                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5500                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5501                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5502                 </links>
5503         </class>
5504         <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">
5505                 <fields oils_persist:primary="id" oils_persist:sequence="">
5506                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5507                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5508                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5509                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5510                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5511                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5512                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5513                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5514                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5515                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5516                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5517                 </fields>
5518                 <links>
5519                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5520                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5521                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5522                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5523                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5524                 </links>
5525         </class>
5526         <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">
5527                 <fields oils_persist:primary="id" oils_persist:sequence="">
5528                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5529                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5530                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5531                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5532                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5533                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5534                         <field reporter:label="Accepting User" name="accepting_usr" />
5535                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5536                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5537                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5540                 </fields>
5541                 <links>
5542                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5543                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5544                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5545                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5546                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5547                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5548                 </links>
5549         </class>
5550         <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">
5551                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5552                         <field name="bucket" reporter:datatype="link"/>
5553                         <field name="id" reporter:datatype="id" />
5554                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5555                         <field name="create_time" reporter:datatype="timestamp" />
5556                         <field name="pos" reporter:datatype="int" />
5557                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5558                 </fields>
5559                 <links>
5560                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5561                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5562             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5563                 </links>
5564         </class>
5565         <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">
5566                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5567                         <field name="id" reporter:datatype="id" />
5568                         <field name="item" reporter:datatype="link"/>
5569                         <field name="note" reporter:datatype="text" />
5570                 </fields>
5571                 <links>
5572                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5573                 </links>
5574         </class>
5575         <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">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5577                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5578                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5579                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5580                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5581                 </fields>
5582                 <links>
5583                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5584                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5585                 </links>
5586         </class>
5587     <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">
5588         <fields oils_persist:primary="field">
5589             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5590             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5591             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5592         </fields>
5593         <links/>
5594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5595             <actions>
5596                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5597                 <retrieve />
5598                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5599                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5600             </actions>
5601         </permacrud>
5602     </class>
5603         <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">
5604                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5605                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5606                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5607                 </fields>
5608                 <links/>
5609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5610             <actions>
5611                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5612                 <retrieve/>
5613                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5614                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5615             </actions>
5616         </permacrud>
5617         </class>
5618
5619
5620         <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">
5621                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5622                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5623                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5624                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5625                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5626                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5627                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5628                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5629                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5630                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5631                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5632                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5633                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5634                 </fields>
5635                 <links>
5636                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5637                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5638                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5639                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5640                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5641                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5642                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5643                 </links>
5644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5645             <actions>
5646                 <create permission="TRANSIT_COPY">
5647                     <context link="target_copy" field="owner"/>
5648                 </create>
5649                 <retrieve/>
5650                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5651                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5652             </actions>
5653         </permacrud>
5654         </class>
5655         <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">
5656                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5657                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5658                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5659                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5660                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5661                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5662                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5663                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5664                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5665                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5667                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5668                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5669                 </fields>
5670                 <links>
5671                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5672                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5673                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5674                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5675                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5676                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5677                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5678                 </links>
5679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5680             <actions>
5681                 <create permission="TRANSIT_COPY" context_field="owner">
5682                     <context link="target_copy" field="circ_lib"/>
5683                 </create>
5684                 <retrieve/>
5685                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5686                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5687             </actions>
5688         </permacrud>
5689         </class>
5690         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5691                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5692                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5693                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5695                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5696                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5697                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5698                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5699                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5700                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5701                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5702                 </fields>
5703                 <links>
5704                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5705                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5706                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5707                 </links>
5708         </class>
5709         <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">
5710                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5711                         <field name="grp" />
5712                         <field name="id" reporter:datatype="id" />
5713                         <field name="usr" />
5714                 </fields>
5715                 <links>
5716                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5717                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5718                 </links>
5719         </class>
5720         <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">
5721                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5722                         <field name="id" reporter:datatype="id" />
5723                         <field name="fq_field" reporter:datatype="text"/>
5724                         <field name="identity_value" reporter:datatype="text"/>
5725                         <field name="translation" reporter:datatype="text"/>
5726                         <field name="string" reporter:datatype="text"/>
5727                 </fields>
5728                 <links>
5729                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5730                 </links>
5731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5732             <actions>
5733                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5734                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5735                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5736                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5737             </actions>
5738         </permacrud>
5739         </class>
5740         <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">
5741                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5742                         <field name="id" reporter:datatype="id" />
5743                         <field name="fm_class" reporter:datatype="text"/>
5744                         <field name="field" reporter:datatype="text"/>
5745                         <field name="owner" reporter:datatype="org_unit"/>
5746                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5747                 </fields>
5748                 <links>
5749                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5750                 </links>
5751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5752             <actions>
5753                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5754                 <retrieve/>
5755                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5756                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5757             </actions>
5758         </permacrud>
5759         </class>
5760         <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">
5761                 <fields oils_persist:primary="code">
5762                         <field name="code" reporter:datatype="id" />
5763                         <field name="marc_code" reporter:datatype="text"/>
5764                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5765                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5766                 </fields>
5767                 <links/>
5768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5769             <actions>
5770                 <create permission="CREATE_LOCALE" global_required="true"/>
5771                 <retrieve/>
5772                 <update permission="UPDATE_LOCALE" global_required="true"/>
5773                 <delete permission="DELETE_LOCALE" global_required="true"/>
5774             </actions>
5775         </permacrud>
5776         </class>
5777         <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">
5778                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5779                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5780                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5781                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5782             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5783                 </fields>
5784                 <links>
5785                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5786                 </links>
5787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5788             <actions>
5789                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5790                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5791                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5792                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5793             </actions>
5794         </permacrud>
5795         </class>
5796
5797         <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">
5798                 <fields oils_persist:primary="id">
5799                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5800                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5801                 </fields>
5802                 <links/>
5803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5804             <actions>
5805                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5806                 <retrieve/>
5807                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5808                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5809             </actions>
5810         </permacrud>
5811         </class>
5812
5813         <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">
5814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5815                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5816                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5817                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5818                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5819                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5820                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5821                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5822                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5823                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5824                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5825                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5826                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5827                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5828                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5829                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5830                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5831                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5832                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5833                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5834                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5835                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5836                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5837                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5838                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5839                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5840                 </fields>
5841                 <links>
5842                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5843                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5844                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5845                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5846                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5847                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5848                 </links>
5849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5850             <actions>
5851                 <create permission="user_request.create">
5852                     <context link="usr" field="home_ou"/>
5853                                 </create>
5854                 <retrieve permission="user_request.view">
5855                     <context link="usr" field="home_ou"/>
5856                                 </retrieve>
5857                 <update permission="user_request.update">
5858                     <context link="usr" field="home_ou"/>
5859                                 </update>
5860                 <delete permission="user_request.delete">
5861                     <context link="usr" field="home_ou"/>
5862                                 </delete>
5863             </actions>
5864         </permacrud>
5865         </class>
5866
5867         <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">
5868                 <fields oils_persist:primary="code">
5869                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5870                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5871                 </fields>
5872                 <links/>
5873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5874             <actions>
5875                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5876                 <retrieve/>
5877                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5878                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5879             </actions>
5880         </permacrud>
5881         </class>
5882
5883         <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">
5884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5885                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5886                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5887                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5888                         <field reporter:label="Ratio" name="ratio" />
5889                 </fields>
5890                 <links>
5891                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5892                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5893                 </links>
5894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5895                         <actions>
5896                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5897                                 <retrieve/>
5898                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5899                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5900                         </actions>
5901                 </permacrud>
5902         </class>
5903
5904         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5905                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5906                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5907                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5908                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5909                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5910                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5911                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5912                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5913                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5914                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5915                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5916                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5917                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5918                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5919                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5920                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5921                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5922                 </fields>
5923                 <links>
5924                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5925                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5926             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5927             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5928             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5929                 </links>
5930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5931             <actions>
5932                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5933                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5934                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5935                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5936             </actions>
5937         </permacrud>
5938         </class>
5939
5940         <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">
5941                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5942                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5943                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5944                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5945                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5946                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5947                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5948                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5949                 </fields>
5950                 <links>
5951                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5952                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5953                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5954                 </links>
5955         </class>
5956
5957         <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">
5958                 <fields oils_persist:primary="code">
5959                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5960                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5961                 </fields>
5962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5963             <actions>
5964                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5965                 <retrieve/>
5966                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5967                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5968             </actions>
5969                 </permacrud>
5970         </class>
5971
5972         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5974                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5975                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5976                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5977                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5978                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5979                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5980                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5981                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5982                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5983                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5984                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5985                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5986                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5987                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5988                 </fields>
5989                 <links>
5990                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5991                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5992                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5993                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5994                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5995                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5996                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5997                 </links>
5998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5999             <actions>
6000                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6001                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6002                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6003                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6004             </actions>
6005         </permacrud>
6006         </class>
6007
6008         <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">
6009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6010                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6011                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6012                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6013                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6014                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6015                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6016                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6017                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6018                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6019                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6020                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6021                 </fields>
6022                 <links>
6023                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6024                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6025                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6026                 </links>
6027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6028             <actions>
6029                 <create   permission="ADMIN_INVOICE">
6030                                         <context link="invoice" field="receiver"/>
6031                                 </create>
6032                 <retrieve permission="ADMIN_INVOICE">
6033                                         <context link="invoice" field="receiver"/>
6034                                 </retrieve>
6035                 <update   permission="ADMIN_INVOICE">
6036                                         <context link="invoice" field="receiver"/>
6037                                 </update>
6038                                 <delete   permission="ADMIN_INVOICE">
6039                                         <context link="invoice" field="receiver"/>
6040                                 </delete>
6041             </actions>
6042         </permacrud>
6043         </class>
6044
6045         <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">
6046                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6048                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6049                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6050                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6051                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6052                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6053                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6054                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6055                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6056                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6057                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6058                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6059                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6060                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6061                 </fields>
6062                 <links>
6063                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6064                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6065                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6066                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6067                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6068                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6069                 </links>
6070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6071             <actions>
6072                 <create   permission="ADMIN_INVOICE">
6073                                         <context link="invoice" field="receiver"/>
6074                                 </create>
6075                 <retrieve permission="ADMIN_INVOICE">
6076                                         <context link="invoice" field="receiver"/>
6077                                 </retrieve>
6078                 <update   permission="ADMIN_INVOICE">
6079                                         <context link="invoice" field="receiver"/>
6080                                 </update>
6081                                 <delete   permission="ADMIN_INVOICE">
6082                                         <context link="invoice" field="receiver"/>
6083                                 </delete>
6084             </actions>
6085         </permacrud>
6086         </class>
6087
6088         <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">
6089                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6090                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6091                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6092                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6093                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6095                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6096                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6097                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6098                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6099                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6100                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6101                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6102                 </fields>
6103                 <links>
6104                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6105                 </links>
6106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6107             <actions>
6108                 <create permission="ADMIN_PROVIDER">
6109                     <context link="provider" field="owner"/>
6110                 </create>
6111                 <retrieve permission="ADMIN_PROVIDER">
6112                     <context link="provider" field="owner"/>
6113                 </retrieve>
6114                 <update permission="ADMIN_PROVIDER">
6115                     <context link="provider" field="owner"/>
6116                 </update>
6117                 <delete permission="ADMIN_PROVIDER">
6118                     <context link="provider" field="owner"/>
6119                 </delete>
6120             </actions>
6121         </permacrud>
6122         </class>
6123
6124         <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">
6125                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6126                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6127                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6128                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6129                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6130                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6131                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6132         </fields>
6133                 <links>
6134                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6135                 </links>
6136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6137             <actions>
6138                 <create permission="ADMIN_PROVIDER">
6139                     <context link="provider" field="owner"/>
6140                 </create>
6141                 <retrieve permission="ADMIN_PROVIDER">
6142                     <context link="provider" field="owner"/>
6143                 </retrieve>
6144                 <update permission="ADMIN_PROVIDER">
6145                     <context link="provider" field="owner"/>
6146                 </update>
6147                 <delete permission="ADMIN_PROVIDER">
6148                     <context link="provider" field="owner"/>
6149                 </delete>
6150             </actions>
6151         </permacrud>
6152     </class>
6153         <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">
6154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6155                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6156                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6157                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6158                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6159                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6160                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6161                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6162                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6163                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6164                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6165                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6166                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6167                 </fields>
6168                 <links>
6169                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6170                 </links>
6171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6172             <actions>
6173                 <create permission="ADMIN_PROVIDER">
6174                     <context link="contact" jump='provider' field="owner"/>
6175                 </create>
6176                 <retrieve permission="ADMIN_PROVIDER">
6177                     <context link="contact" jump='provider' field="owner"/>
6178                 </retrieve>
6179                 <update permission="ADMIN_PROVIDER">
6180                     <context link="contact" jump='provider' field="owner"/>
6181                 </update>
6182                 <delete permission="ADMIN_PROVIDER">
6183                     <context link="contact" jump='provider' field="owner"/>
6184                 </delete>
6185             </actions>
6186         </permacrud>
6187         </class>
6188
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6191                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6192                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6193                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6194                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6195                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6196                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6197                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6198                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6199                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6200                 </fields>
6201                 <links>
6202                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6203                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6204                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6205                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6206                 </links>
6207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6208                 </permacrud>
6209         </class>
6210
6211         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6213                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6214                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6215                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6216                 </fields>
6217                 <links>
6218             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6219                 </links>
6220                 <!--
6221                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6222                         But here's what it should look like if we ever do use pcrud.
6223                 -->
6224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6225                         <actions>
6226                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6227                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6228                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6229                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6230                         </actions>
6231                 </permacrud>
6232         </class>
6233
6234         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6235                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6236                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6237                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6238                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6239                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6240                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6241                 </fields>
6242                 <links>
6243                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6244                 </links>
6245                 <!--
6246                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6247                         But here's what it should look like if we ever do use pcrud.
6248                 -->
6249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6250                         <actions>
6251                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6252                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6253                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6254                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6255                         </actions>
6256                 </permacrud>
6257         </class>
6258
6259         <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">
6260                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6261                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6262                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6263                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6264                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6265                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6266                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6267                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6268                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6269                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6270                 </fields>
6271                 <links>
6272                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6273                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6274             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6275             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6276                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6277                 </links>
6278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6279             <actions>
6280                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6281                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6282                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6283                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6284             </actions>
6285         </permacrud>
6286         </class>
6287
6288         <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">
6289                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6290                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6291                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6292                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6293                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6294                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6295                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6296                 </fields>
6297                 <links>
6298                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6299                 </links>
6300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6301                         <actions>
6302                                 <create permission="ADMIN_FUNDING_SOURCE">
6303                     <context link="funding_source" field="owner"/>
6304                 </create>
6305                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6306                     <context link="funding_source" field="owner"/>
6307                 </retrieve>
6308                                 <update permission="ADMIN_FUNDING_SOURCE">
6309                     <context link="funding_source" field="owner"/>
6310                 </update>
6311                                 <delete permission="ADMIN_FUNDING_SOURCE">
6312                     <context link="funding_source" field="owner"/>
6313                 </delete>
6314                         </actions>
6315                 </permacrud>
6316         </class>
6317
6318         <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">
6319                 <fields oils_persist:primary="id">
6320                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6321                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6322                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6323                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6324                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6325                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6326                 </fields>
6327                 <links>
6328                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6329                 </links>
6330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6331                 </permacrud>
6332         </class>
6333
6334         <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">
6335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6336                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6337                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6338                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6339                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6340                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6341                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6342                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6343                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6344                 </fields>
6345                 <links>
6346                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6347                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6348                 </links>
6349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6350                         <actions>
6351                                 <create permission="ADMIN_ACQ_FUND">
6352                     <context link="fund" field="org"/>
6353                 </create>
6354                                 <retrieve permission="ADMIN_ACQ_FUND">
6355                     <context link="fund" field="org"/>
6356                 </retrieve>
6357                                 <update permission="ADMIN_ACQ_FUND">
6358                     <context link="fund" field="org"/>
6359                 </update>
6360                                 <delete permission="ADMIN_ACQ_FUND">
6361                     <context link="fund" field="org"/>
6362                 </delete>
6363                         </actions>
6364                 </permacrud>
6365         </class>
6366
6367         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6369                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6370                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6371                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6372                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6373                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6374                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6375                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6376                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6377                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6378                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6379                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6380                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6381                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6382                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6383                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6384                 </fields>
6385                 <links>
6386                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6387                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6388             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6389             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6390             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6391                 </links>
6392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6393             <actions>
6394                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6395                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6396                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6397                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6398             </actions>
6399         </permacrud>
6400         </class>
6401
6402         <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">
6403                 <fields oils_persist:primary="fund">
6404                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6405                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6406                 </fields>
6407                 <links>
6408                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6409                 </links>
6410         </class>
6411
6412         <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">
6413                 <fields oils_persist:primary="fund">
6414                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6415                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6416                 </fields>
6417                 <links>
6418                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6419                 </links>
6420         </class>
6421
6422         <class id="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">
6423                 <fields oils_persist:primary="fund">
6424                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6425                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6426                 </fields>
6427                 <links>
6428                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6429                 </links>
6430         </class>
6431
6432         <class id="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">
6433                 <fields oils_persist:primary="fund">
6434                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6435                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6436                 </fields>
6437                 <links>
6438                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6439                 </links>
6440         </class>
6441
6442         <class id="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">
6443                 <fields oils_persist:primary="fund">
6444                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6445                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6446                 </fields>
6447                 <links>
6448                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6449                 </links>
6450         </class>
6451
6452    <class id="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">
6453         <fields oils_persist:primary="fund">
6454             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6455             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6456         </fields>
6457         <links>
6458             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6459         </links>
6460     </class>
6461
6462    <class id="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">
6463         <fields oils_persist:primary="fund">
6464             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6465             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6466         </fields>
6467         <links>
6468             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6469         </links>
6470     </class>
6471
6472    <class id="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">
6473         <fields oils_persist:primary="fund">
6474             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6475             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6476         </fields>
6477         <links>
6478             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6479         </links>
6480     </class>
6481
6482    <class id="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">
6483         <fields oils_persist:primary="fund">
6484             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6485             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6486         </fields>
6487         <links>
6488             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6489         </links>
6490     </class>
6491
6492    <class id="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">
6493         <fields oils_persist:primary="fund">
6494             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6495             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6496         </fields>
6497         <links>
6498             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6499         </links>
6500     </class>
6501
6502         <class id="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">
6503                 <fields oils_persist:primary="funding_source">
6504                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6505                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6506                 </fields>
6507                 <links>
6508                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6509                 </links>
6510         </class>
6511
6512         <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">
6513                 <fields oils_persist:primary="funding_source">
6514                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6515                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6516                 </fields>
6517                 <links>
6518                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6519                 </links>
6520         </class>
6521
6522         <class id="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">
6523                 <fields oils_persist:primary="funding_source">
6524                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6525                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6526                 </fields>
6527                 <links>
6528                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6529                 </links>
6530         </class>
6531
6532         <class id="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">
6533                 <fields oils_persist:primary="fund">
6534                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6535                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6536                 </fields>
6537                 <links>
6538                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6539                 </links>
6540         </class>
6541
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6544                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6545                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6546                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6548                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6549                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6550                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6551                 </fields>
6552                 <links>
6553                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6554                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6555                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6556                 </links>
6557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6558                         <actions>
6559                                 <create permission="ADMIN_ACQ_FUND">
6560                     <context link="fund" field="org"/>
6561                 </create>
6562                                 <retrieve permission="ADMIN_ACQ_FUND">
6563                     <context link="fund" field="org"/>
6564                 </retrieve>
6565                                 <update permission="ADMIN_ACQ_FUND">
6566                     <context link="fund" field="org"/>
6567                 </update>
6568                                 <delete permission="ADMIN_ACQ_FUND">
6569                     <context link="fund" field="org"/>
6570                 </delete>
6571                         </actions>
6572                 </permacrud>
6573         </class>
6574
6575     <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">
6576         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6577             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6578             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6579             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6580             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6581             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6582             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6583             <field reporter:label="Note" name="note" reporter:datatype="text" />
6584             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6585         </fields>
6586         <links>
6587             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6588             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6589             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6590         </links>
6591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6592                         <actions>
6593                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6594                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6595                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6596                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6597                         </actions>
6598                 </permacrud>
6599     </class>
6600
6601         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6603                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6604                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6605                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6606                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6607                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6608                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6609                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6610                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6611                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6612                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6613                 </fields>
6614                 <links>
6615                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6616                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6617                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6618                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6619                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6620                 </links>
6621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622                         <actions>
6623                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6624                         </actions>
6625                 </permacrud>
6626         </class>
6627
6628         <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">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6630                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6631                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6632                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6633                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6634                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6635                 </fields>
6636                 <links>
6637                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6638                 </links>
6639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6640                         <actions>
6641                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6642                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6643                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6644                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6645                         </actions>
6646                 </permacrud>
6647         </class>
6648
6649         <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">
6650                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6651                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6652                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6653                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6654                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6655                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6656                         <field reporter:label="State" name="state" reporter:datatype="text" />
6657                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6658                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6659                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6660                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6661                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6662                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6663                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6664                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6665                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6666                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6667                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6668                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6669                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6670                 </fields>
6671                 <links>
6672                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6675                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6676                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6677                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6678                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6679                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6680                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6681                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6682                 </links>
6683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6684                         <actions>
6685                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6686                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6687                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6688                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6689                         </actions>
6690                 </permacrud>
6691         </class>
6692
6693         <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">
6694                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6695                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6696                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6697                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6698                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6699                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6700                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6701                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6702                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6703                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6704                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6705                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6706                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6707                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6708                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6709                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6710                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6711                 </fields>
6712                 <links>
6713                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6714                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6715                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6716                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6717                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6718                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6719                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6720                 </links>
6721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6722             <actions>
6723                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6724             </actions>
6725                 </permacrud>
6726         </class>
6727
6728         <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">
6729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6730                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6731                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6732                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6733                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6734                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6735                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6736                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6737                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6738                 </fields>
6739                 <links>
6740                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6741                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6742                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6743                 </links>
6744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6745             <actions>
6746                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6747                     <context link="purchase_order" field="ordering_agency"/>
6748                 </retrieve>
6749                 <create permission="CREATE_PURCHASE_ORDER">
6750                     <context link="purchase_order" field="ordering_agency"/>
6751                 </create>
6752                 <update permission="CREATE_PURCHASE_ORDER">
6753                     <context link="purchase_order" field="ordering_agency"/>
6754                 </update>
6755                 <delete permission="CREATE_PURCHASE_ORDER">
6756                     <context link="purchase_order" field="ordering_agency"/>
6757                 </delete>
6758             </actions>
6759                 </permacrud>
6760         </class>
6761
6762         <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">
6763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6765                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6766                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6767                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6768                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6769                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6770                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6771                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6772                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6773                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6774                 </fields>
6775                 <links>
6776                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6777                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6778                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6779                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6780                 </links>
6781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6782             <actions>
6783                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6784                     <context link="purchase_order" field="ordering_agency"/>
6785                 </retrieve>
6786                 <create permission="CREATE_PURCHASE_ORDER">
6787                     <context link="purchase_order" field="ordering_agency"/>
6788                 </create>
6789                 <update permission="CREATE_PURCHASE_ORDER">
6790                     <context link="purchase_order" field="ordering_agency"/>
6791                 </update>
6792                 <delete permission="CREATE_PURCHASE_ORDER">
6793                     <context link="purchase_order" field="ordering_agency"/>
6794                 </delete>
6795             </actions>
6796                 </permacrud>
6797         </class>
6798
6799         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6800                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6801                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6802                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6803                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6804                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6805                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6806                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6807                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6808                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6809                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6810                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6811                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6812                         <field reporter:label="State" name="state" reporter:datatype="text" />
6813                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6814                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6815                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6816                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6817                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6818                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6819                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6820                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6821                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6822                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6823                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6824                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6825                 </fields>
6826                 <links>
6827                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6828                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6829                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6830                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6831                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6832                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6833                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6834                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6835                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6836                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6837                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6838                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6839                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6840                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6841                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6842                 </links>
6843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6844                         <actions>
6845                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6846                                         <context link="purchase_order" field="ordering_agency"/>
6847                                         <context link="picklist" field="org_unit"/>
6848                                 </retrieve>
6849                         </actions>
6850                 </permacrud>
6851         </class>
6852
6853         <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">
6854                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6855                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6856                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6857                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6858                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6859                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6860                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6861                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6862                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6863                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6864                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6865                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6866                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6867                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6868                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6869                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6870                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6871                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6872                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6873                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6874                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6875                 </fields>
6876                 <links>
6877                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6878                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6879                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6880                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6881                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6882                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6883                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6884                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6885                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6886                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6887                 </links>
6888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6889                         <actions>
6890                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6891                                         <context link="purchase_order" field="ordering_agency"/>
6892                                         <context link="picklist" field="org_unit"/>
6893                                 </retrieve>
6894                         </actions>
6895                 </permacrud>
6896         </class>
6897
6898         <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">
6899                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6900                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6901                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6902                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6903                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6904                 </fields>
6905                 <links>
6906                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6907                 </links>
6908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6909                         <actions>
6910                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6911                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6912                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6913                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6914                         </actions>
6915                 </permacrud>
6916         </class>
6917
6918         <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">
6919                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6920                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6921                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6922                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6923                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6924                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6925                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6926                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6927                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6928                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6929                 </fields>
6930                 <links>
6931                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6932                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6933                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6934                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6935                 </links>
6936         </class>
6937
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6940                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6941                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6942                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6943                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6944                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6945                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6946                 </fields>
6947                 <links>
6948                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6949                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6950                 </links>
6951         </class>
6952
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6955                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6956                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6957                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6958                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6959                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6960                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6961                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6962                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6963                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6964                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6965                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6966                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6967                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6968                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6969                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6970                 </fields>
6971                 <links>
6972                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6973                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6974                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6975                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6976                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6977                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6978                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6979                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6980                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6981                 </links>
6982         </class>
6983
6984         <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">
6985                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6986                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6987                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6988                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6989                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6990                 </fields>
6991                 <links/>
6992                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6993                         <actions>
6994                                 <retrieve />
6995                         </actions>
6996                 </permacrud>
6997         </class>
6998
6999         <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">
7000                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7001                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7002                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7004                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7005                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7006             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7007                 </fields>
7008                 <links/>
7009         <permacrud>
7010             <actions>
7011                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7012                 <retrieve />
7013                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7014                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7015             </actions>
7016         </permacrud>
7017         </class>
7018
7019         <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">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7021                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7022                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7023                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7024                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7025                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7026                 </fields>
7027                 <links/>
7028         </class>
7029         <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">
7030                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7031                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7032                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7033                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7034                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7035                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7036                 </fields>
7037                 <links>
7038                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7039                 </links>
7040         </class>
7041
7042         <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">
7043             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7044                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7045                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7046                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7047                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7048                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7049                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7050         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7051
7052             </fields>
7053             <links>
7054                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7055             </links>
7056             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7057                 <actions>
7058                     <create permission="ADMIN_PROVIDER">
7059                         <context link="provider" field="owner"/>
7060                     </create>
7061                     <retrieve permission="ADMIN_PROVIDER">
7062                         <context link="provider" field="owner"/>
7063                     </retrieve>
7064                     <update permission="ADMIN_PROVIDER">
7065                         <context link="provider" field="owner"/>
7066                     </update>
7067                     <delete permission="ADMIN_PROVIDER">
7068                         <context link="provider" field="owner"/>
7069                     </delete>
7070                 </actions>
7071             </permacrud>
7072         </class>
7073         
7074         <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">
7075             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7076                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7077                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7078                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7079                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7080             </fields>
7081             <links>
7082                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7083             </links>
7084             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7085                 <actions>
7086                     <create permission="ADMIN_PROVIDER">
7087                         <context link="provider" field="owner"/>
7088                     </create>
7089                     <retrieve permission="ADMIN_PROVIDER">
7090                         <context link="provider" field="owner"/>
7091                     </retrieve>
7092                     <update permission="ADMIN_PROVIDER">
7093                         <context link="provider" field="owner"/>
7094                     </update>
7095                     <delete permission="ADMIN_PROVIDER">
7096                         <context link="provider" field="owner"/>
7097                     </delete>
7098                 </actions>
7099             </permacrud>
7100         </class>
7101         
7102         <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">
7103             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7104                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7105                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7106                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7107                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7108                 </fields>
7109                 <links/>
7110         </class>
7111
7112         <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">
7113                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7114                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7115                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7116                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7117                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7118                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7119                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7120                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7121                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7122                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7123                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7124                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7125                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7126                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7127                 </fields>
7128                 <links>
7129                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7130                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7131                 </links>
7132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7133             <actions>
7134                 <create permission="ADMIN_PROVIDER">
7135                     <context link="provider" field="owner"/>
7136                 </create>
7137                 <retrieve permission="ADMIN_PROVIDER">
7138                     <context link="provider" field="owner"/>
7139                 </retrieve>
7140                 <update permission="ADMIN_PROVIDER">
7141                     <context link="provider" field="owner"/>
7142                 </update>
7143                 <delete permission="ADMIN_PROVIDER">
7144                     <context link="provider" field="owner"/>
7145                 </delete>
7146             </actions>
7147         </permacrud>
7148         </class>
7149
7150         <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">
7151                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7152                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7153                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7154                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7155                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7156                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7157                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7158                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7159                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7160                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7161                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7162                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7163                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7164                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7165                 </fields>
7166                 <links>
7167                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7168                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7169                 </links>
7170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7171             <actions>
7172                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7173                     <context link="account" jump="provider" field="owner"/>
7174                 </retrieve>
7175                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7176                     <context link="account" jump="provider" field="owner"/>
7177                 </update>
7178                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7179                     <context link="account" jump="provider" field="owner"/>
7180                 </delete>
7181             </actions>
7182         </permacrud>
7183         </class>
7184
7185
7186         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7187                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7188                         <field name="id" reporter:datatype="id" />
7189                         <field name="parent" reporter:datatype="link"/>
7190                         <field name="owner" reporter:datatype="link"/>
7191                         <field name="create_time" reporter:datatype="timestamp"/>
7192                         <field name="name" reporter:datatype="text"/>
7193                         <field name="shared" reporter:datatype="bool"/>
7194                         <field name="share_with" reporter:datatype="link"/>
7195                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7197                 </fields>
7198                 <links>
7199                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7200                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7201                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7202                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7203                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7204                 </links>
7205         </class>
7206         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7207                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7208                         <field name="id" reporter:datatype="id" />
7209                         <field name="parent" reporter:datatype="link"/>
7210                         <field name="owner" reporter:datatype="link"/>
7211                         <field name="create_time" reporter:datatype="timestamp"/>
7212                         <field name="name" reporter:datatype="text"/>
7213                         <field name="shared" reporter:datatype="bool"/>
7214                         <field name="share_with" reporter:datatype="link"/>
7215                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7216                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7217                 </fields>
7218                 <links>
7219                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7220                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7221                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7222                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7223                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7224                 </links>
7225         </class>
7226         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7227                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7228                         <field name="id" reporter:datatype="id" />
7229                         <field name="parent" reporter:datatype="link"/>
7230                         <field name="owner" reporter:datatype="link"/>
7231                         <field name="create_time" reporter:datatype="timestamp"/>
7232                         <field name="name" reporter:datatype="text"/>
7233                         <field name="shared" reporter:datatype="bool"/>
7234                         <field name="share_with" reporter:datatype="link"/>
7235                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7236                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7237                 </fields>
7238                 <links>
7239                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7240                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7241                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7242                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7243                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7244                 </links>
7245         </class>
7246         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7247                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7248                         <field name="id" reporter:datatype="id" />
7249                         <field name="owner" reporter:datatype="link"/>
7250                         <field name="create_time" reporter:datatype="timestamp"/>
7251                         <field name="name" reporter:datatype="text"/>
7252                         <field name="data" reporter:datatype="text"/>
7253                         <field name="folder" reporter:datatype="link"/>
7254                         <field name="description" reporter:datatype="text"/>
7255                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7256                 </fields>
7257                 <links>
7258                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7259                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7260                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7261                 </links>
7262         </class>
7263         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7264                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7265                         <field name="id" reporter:datatype="id" />
7266                         <field name="owner" reporter:datatype="link"/>
7267                         <field name="create_time" reporter:datatype="timestamp"/>
7268                         <field name="template" reporter:datatype="link"/>
7269                         <field name="data" reporter:datatype="text"/>
7270                         <field name="folder" reporter:datatype="link"/>
7271                         <field name="recur" reporter:datatype="bool"/>
7272                         <field name="recurrence" reporter:datatype="interval"/>
7273                         <field name="name" reporter:datatype="text"/>
7274                         <field name="description" reporter:datatype="text"/>
7275                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7276                 </fields>
7277                 <links>
7278                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7279                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7280                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7281                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7282                 </links>
7283         </class>
7284         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7286                         <field name="id" reporter:datatype="id" />
7287                         <field name="runner" reporter:datatype="link"/>
7288                         <field name="start_time" reporter:datatype="timestamp"/>
7289                         <field name="complete_time" reporter:datatype="timestamp"/>
7290                         <field name="run_time" reporter:datatype="timestamp"/>
7291                         <field name="email" reporter:datatype="text"/>
7292                         <field name="excel_format" reporter:datatype="bool"/>
7293                         <field name="csv_format" reporter:datatype="bool"/>
7294                         <field name="html_format" reporter:datatype="bool"/>
7295                         <field name="error_code" reporter:datatype="int"/>
7296                         <field name="error_text" reporter:datatype="text"/>
7297                         <field name="report" reporter:datatype="link"/>
7298                         <field name="folder" reporter:datatype="link"/>
7299                         <field name="chart_pie" reporter:datatype="bool"/>
7300                         <field name="chart_bar" reporter:datatype="bool"/>
7301                         <field name="chart_line" reporter:datatype="bool"/>
7302                 </fields>
7303                 <links>
7304                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7305                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7306                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7307                 </links>
7308         </class>
7309         <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">
7310                 <fields oils_persist:primary="id">
7311                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7312                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7313                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7314                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7315                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7316                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7317                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7318                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7319                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7320                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7321                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7322                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7323                 </fields>
7324                 <links>
7325                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7326                 </links>
7327         </class>
7328         <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">
7329                 <fields oils_persist:primary="id">
7330                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7331                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7332                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7333                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7334                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7335                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7336                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7337                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7338                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7339                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7340                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7341                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7342                 </fields>
7343                 <links>
7344                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7345                 </links>
7346         </class>
7347         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7348                 <fields oils_persist:primary="id">
7349                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7350                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7351                         <field reporter:label="Fingerprint" name="fingerprint" />
7352                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7353                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7354                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7355                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7356                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7357                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7358                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7359                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7360                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7361                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7362                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7363                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7364                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7365                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7366                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7367                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7368                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7369                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7370                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7371                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7372                 </fields>
7373                 <links>
7374                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7375                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7376                 </links>
7377         </class>
7378         <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">
7379                 <fields oils_persist:primary="id">
7380                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7381                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7382                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7383                 </fields>
7384                 <links>
7385                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7386                 </links>
7387         </class>
7388         <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">
7389                 <fields oils_persist:primary="id">
7390                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7391                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7392                 </fields>
7393                 <links>
7394                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7395                 </links>
7396         </class>
7397         <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">
7398                 <fields oils_persist:primary="id">
7399                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7400                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7401                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7402                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7403                 </fields>
7404                 <links>
7405                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7406                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7407                 </links>
7408         </class>
7409         <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">
7410                 <fields oils_persist:primary="xact">
7411                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7412                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7413                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7414                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7415                 </fields>
7416                 <links>
7417                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7418                 </links>
7419         </class>
7420         <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">
7421                 <fields oils_persist:primary="xact">
7422                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7423                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7424                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7425                         <field reporter:label="Total Paid 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="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)">
7432                 <fields oils_persist:primary="id">
7433                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7434                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7435                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7436                 </fields>
7437                 <links>
7438                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7439                 </links>
7440         </class>
7441         <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">
7442                 <fields oils_persist:primary="id">
7443                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7444                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7445                 </fields>
7446                 <links>
7447                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7448                 </links>
7449         </class>
7450         <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">
7451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7452                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7453                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7454                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7455                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7456                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7457                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7458                 </fields>
7459                 <links>
7460                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7461                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7462                 </links>
7463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7464                         <actions>
7465                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7466                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7467                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7468                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7469                         </actions>
7470                 </permacrud>
7471         </class>
7472         <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">
7473                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7474                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7475                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7476                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7477                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7478                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7479                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7480                 </fields>
7481                 <links>
7482                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7483                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7484                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7485                 </links>
7486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7487                         <actions>
7488                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7489                                         <context link="formula" field="owner"/>
7490                                 </create>
7491                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7492                                         <context link="formula" field="owner"/>
7493                                 </retrieve>
7494                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7495                                         <context link="formula" field="owner"/>
7496                                 </update>
7497                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7498                                         <context link="formula" field="owner"/>
7499                                 </delete>
7500                         </actions>
7501                 </permacrud>
7502         </class>
7503
7504         <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">
7505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7506                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7507                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7508                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7509                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7510                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7511                 </fields>
7512                 <links>
7513                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7514                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7515                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7516                 </links>
7517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7518                         <actions>
7519                                 <create permission="CREATE_PURCHASE_ORDER">
7520                                         <context link="formula" field="owner"/>
7521                 </create>
7522                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7523                                         <context link="formula" field="owner"/>
7524                 </retrieve>
7525                                 <update permission="CREATE_PURCHASE_ORDER">
7526                                         <context link="formula" field="owner"/>
7527                 </update>
7528                                 <delete permission="CREATE_PURCHASE_ORDER">
7529                                         <context link="formula" field="owner"/>
7530                 </delete>
7531                         </actions>
7532                 </permacrud>
7533         </class>
7534
7535         <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">
7536                 <fields oils_persist:primary="id">
7537                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7538                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7539                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7540                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7541                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7542                 </fields>
7543                 <links>
7544                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7545                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7546                 </links>
7547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548                 </permacrud>
7549         </class>
7550
7551         <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">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7553                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7554                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7555                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7556                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7557                 </fields>
7558                 <links>
7559                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7560                 </links>
7561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562                         <actions>
7563                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7564                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7565                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7566                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7567                         </actions>
7568                 </permacrud>
7569         </class>
7570
7571         <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">
7572                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7573                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7574                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7575                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7576                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7577                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7578                 </fields>
7579                 <links>
7580                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7581                 </links>
7582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7583                         <actions>
7584                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7585                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7586                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7587                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7588                         </actions>
7589                 </permacrud>
7590         </class>
7591
7592         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7594                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7595                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7596                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7597                 </fields>
7598                 <links>
7599                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7600                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7601                 </links>
7602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603                 </permacrud>
7604         </class>
7605
7606         <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">
7607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7608                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7609                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7610                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7611                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7612                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7613                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7614                 </fields>
7615                 <links>
7616                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7617                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7618                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7619                 </links>
7620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7621                 </permacrud>
7622         </class>
7623
7624         <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">
7625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7626                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7627                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7628                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7629                 </fields>
7630                 <links>
7631                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7632                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7633                 </links>
7634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7635                 </permacrud>
7636         </class>
7637
7638         <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">
7639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7640                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7641                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7642                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7643                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7644                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7645                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7646                 </fields>
7647                 <links>
7648                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7649                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7650                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7651                 </links>
7652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7653                 </permacrud>
7654         </class>
7655
7656         <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">
7657                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7658                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7659                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7660                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7661                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7662                 </fields>
7663                 <links>
7664                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7665                 </links>
7666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7667             <actions>
7668                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7669                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7670                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7671                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7672             </actions>
7673                 </permacrud>
7674         </class>
7675
7676         <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">
7677                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7678                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7679                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7680                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7681                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7682                 </fields>
7683                 <links>
7684                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7685                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7686                 </links>
7687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7688                         <actions>
7689                                 <create permission="ADMIN_CLAIM_POLICY">
7690                                         <context link="claim_policy" field="org_unit"/>
7691                 </create>
7692                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7693                                         <context link="claim_policy" field="org_unit"/>
7694                 </retrieve>
7695                                 <update permission="ADMIN_CLAIM_POLICY">
7696                                         <context link="claim_policy" field="org_unit"/>
7697                 </update>
7698                                 <delete permission="ADMIN_CLAIM_POLICY">
7699                                         <context link="claim_policy" field="org_unit"/>
7700                 </delete>
7701                         </actions>
7702                 </permacrud>
7703         </class>
7704
7705     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7706         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7707             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7708             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7709             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7710             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7711             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7712             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7713             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7714             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7715             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7716             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7717             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7718             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7719             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7720             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7721             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7722         </fields>
7723     </class>
7724
7725     <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">
7726         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7727             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7728             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7729             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7730             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7731             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7732         </fields>
7733     </class>
7734
7735     <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">
7736         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7737             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7738             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7739             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7740             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7741             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7742             <field reporter:label="City" name="city" reporter:datatype="text"/>
7743             <field reporter:label="State" name="state" reporter:datatype="text"/>
7744             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7745             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7746             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7747         </fields>
7748     </class>
7749
7750     <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">
7751         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7752             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7753             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7754             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7755             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7756             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7757             <field reporter:label="City" name="city" reporter:datatype="text"/>
7758             <field reporter:label="State" name="state" reporter:datatype="text"/>
7759             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7760             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7761             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7762         </fields>
7763     </class>
7764
7765     <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">
7766         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7767             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7768             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7769             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7770             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7771             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7772             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7773         </fields>
7774     </class>
7775
7776         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7777                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7778                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7779                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7780                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7781                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7782                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7783                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7784                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7785                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7786                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7787                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7788                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7789                 </fields>
7790                 <links>
7791                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7792                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7793                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7794                 </links>
7795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7801                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7802                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7803                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7804                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7805                 </fields>
7806                 <links>
7807                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7808                 </links>
7809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7810                 </permacrud>
7811         </class>
7812
7813     <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">
7814         <fields>
7815             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7816             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7817             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7818         </fields>
7819                 <links>
7820                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7821                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7822                 </links>
7823     </class>
7824
7825     <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">
7826         <fields>
7827             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7828             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7829         </fields>
7830                 <links>
7831                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7832                 </links>
7833     </class>
7834
7835     <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">
7836         <fields>
7837             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7838             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7839             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7840         </fields>
7841                 <links>
7842                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7843                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7844                 </links>
7845     </class>
7846
7847     <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">
7848         <fields>
7849             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7850             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7851         </fields>
7852                 <links>
7853                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7854                 </links>
7855     </class>
7856
7857     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7858                 <oils_persist:source_definition>
7859
7860             SELECT  DISTINCT l.*
7861               FROM  action.unfulfilled_hold_loops l
7862                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7863               WHERE l.count = m.max
7864
7865                 </oils_persist:source_definition>
7866         <fields>
7867             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7868             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7869             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7870         </fields>
7871                 <links>
7872                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7873                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7874                 </links>
7875     </class>
7876
7877         <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">
7878                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7879                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7880                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7881                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7882                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7883                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7884                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7885                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7886                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7887                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7888                 </fields>
7889                 <links>
7890                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7891                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7892                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7893                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7894                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7895                 </links>
7896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7897                 </permacrud>
7898         </class>
7899
7900         <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">
7901                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7902                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7903                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7904                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7905                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7906                 </fields>
7907                 <links>
7908                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7909                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7910                 </links>
7911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7912                 </permacrud>
7913         </class>
7914
7915         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7917                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7918                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7919                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7920                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7921                 </fields>
7922                 <links>
7923                 </links>
7924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7925                 </permacrud>
7926         </class>
7927
7928         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7929                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7930                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7931                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7932                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7933                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7934                 </fields>
7935                 <links>
7936                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7937                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7938                 </links>
7939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7940                 </permacrud>
7941         </class>
7942         
7943         <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">
7944                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7945                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7946                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7947                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7948                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7949                 </fields>
7950                 <links>
7951                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7952                 </links>
7953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954                 </permacrud>
7955         </class>
7956         
7957         <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">
7958                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7959                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7960                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7962                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7963                 </fields>
7964                 <links>
7965                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7966                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7967                 </links>
7968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7969                 </permacrud>
7970         </class>
7971
7972         <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">
7973                 <fields oils_persist:primary="name">
7974                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7975                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7976                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7977                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7978                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7979                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7980                 </fields>
7981                 <links>
7982                 </links>
7983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7984                 </permacrud>
7985         </class>
7986
7987         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7988                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7989                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7990                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7991                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7992                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7993                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7994                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7995                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7996                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7997                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7998                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7999                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8000                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8001                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8002                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8003                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8004                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8005                 </fields>
8006                 <links>
8007                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8008                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8009                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8010                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8011                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8012                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8013                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8014                 </links>
8015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016                 </permacrud>
8017         </class>
8018
8019         <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">
8020                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8021                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8022                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8023                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8024                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8025                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8026                 </fields>
8027                 <links>
8028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8029                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8030                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8031                 </links>
8032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8033                 </permacrud>
8034         </class>
8035
8036         <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">
8037                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8038                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8039                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8040                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8041                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8042                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8043                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8044                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8045                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8046                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8047                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8048                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8049                 </fields>
8050                 <links>
8051                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8052                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8053                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8054                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8055                 </links>
8056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8057                 </permacrud>
8058         </class>
8059
8060         <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">
8061                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8062                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8063                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8064                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8065                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8066                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8067                 </fields>
8068                 <links>
8069                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8070                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8071                 </links>
8072                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8073                 </permacrud>
8074         </class>
8075
8076         <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">
8077                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8078                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8079                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8080                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8081                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8082                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8083                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8084                 </fields>
8085                 <links>
8086                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8087                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8088                 </links>
8089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8090                 </permacrud>
8091         </class>
8092
8093         <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">
8094                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8095                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8096                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8097                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8098                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8099                 </fields>
8100                 <links>
8101                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8102                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8103                 </links>
8104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8105                 </permacrud>
8106         </class>
8107
8108         <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">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8110                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8111                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8112                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8113                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8114                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8115                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8116                 </fields>
8117                 <links>
8118                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8119                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8120                 </links>
8121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8122                 </permacrud>
8123         </class>
8124
8125         <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">
8126                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8127                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8128                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8129                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8130                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8131                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8132                 </fields>
8133                 <links>
8134                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8135                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8136                 </links>
8137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8138                 </permacrud>
8139         </class>
8140
8141         <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">
8142                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8143                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8144                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8145                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8146                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8147                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8148                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8149                 </fields>
8150                 <links>
8151                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8152                 </links>
8153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8154                 </permacrud>
8155         </class>
8156
8157         <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">
8158                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8159                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8160                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8161                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8162                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8163                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8164                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8165                 </fields>
8166                 <links>
8167                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8168                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8169                 </links>
8170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8171                 </permacrud>
8172         </class>
8173
8174         <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">
8175                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8176                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8177                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8178                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8179                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8180                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8181                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8182                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8183                 </fields>
8184                 <links>
8185                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8186                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8187                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8188                 </links>
8189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8190                 </permacrud>
8191         </class>
8192
8193         <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">
8194                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8195                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8196                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8197                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8198                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8199                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8200                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8201                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8202                 </fields>
8203                 <links>
8204                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8205                 </links>
8206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8207                 </permacrud>
8208         </class>
8209
8210         <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">
8211                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8212                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8213                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8214                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8215                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8216                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8217                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8218                 </fields>
8219                 <links>
8220                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8221                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8222                 </links>
8223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8224                 </permacrud>
8225         </class>
8226
8227         <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">
8228                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8229                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8230                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8231                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8232                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8233                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8234                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8235                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8236                 </fields>
8237                 <links>
8238                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8239                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8240                 </links>
8241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8242                 </permacrud>
8243         </class>
8244
8245         <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">
8246                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8247                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8248                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8249                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8250                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8251                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8252                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8253                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8254                 </fields>
8255                 <links>
8256                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8257                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8258                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8259                 </links>
8260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8261                 </permacrud>
8262         </class>
8263
8264         <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">
8265                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8266                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8267                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8268                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8269                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8270                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8271                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8272                 </fields>
8273                 <links>
8274                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8275                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8276                 </links>
8277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8278                 </permacrud>
8279         </class>
8280
8281         <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">
8282                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8283                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8284                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8285                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8286                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8287                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8288                 </fields>
8289                 <links>
8290                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8291                 </links>
8292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8293                 </permacrud>
8294         </class>
8295
8296         <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">
8297                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8298                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8299                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8300                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8302                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8303                 </fields>
8304                 <links>
8305                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8306                 </links>
8307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8308                 </permacrud>
8309         </class>
8310
8311         <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">
8312                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8313                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8314                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8315                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8316                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8317                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8318                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8319                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8320                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8321                 </fields>
8322                 <links>
8323                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8324                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8325                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8326                 </links>
8327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8328                 </permacrud>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8333                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8334                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8335                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8336                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8337                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8338                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8339                 </fields>
8340                 <links>
8341                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8342                 </links>
8343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8344                 </permacrud>
8345         </class>
8346
8347         <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">
8348                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8349                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8350                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8351                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8352                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8353                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8354                 </fields>
8355                 <links>
8356                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8357                 </links>
8358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8359                 </permacrud>
8360         </class>
8361
8362         <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">
8363                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8364                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8365                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8366                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8367                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8368                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8369                 </fields>
8370                 <links>
8371                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8372                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8373                 </links>
8374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8375                 </permacrud>
8376         </class>
8377
8378         <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">
8379                 <fields oils_persist:primary="id">
8380                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8381                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8382                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8383                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8384                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8385                 </fields>
8386                 <links>
8387                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8388                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8389                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8390                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8391                 </links>
8392         </class>
8393
8394         <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">
8395                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8396                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8397                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8398                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8399                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8400                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8401                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8402                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8403                 </fields>
8404                 <links/>
8405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8406                         <actions>
8407                                 <retrieve/>
8408                         </actions>
8409                 </permacrud>
8410         </class>
8411
8412         <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">
8413                 <fields oils_persist:primary="ptype_key">
8414                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8415                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8416                 </fields>
8417                 <links/>
8418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419                         <actions>
8420                                 <retrieve/>
8421                         </actions>
8422                 </permacrud>
8423         </class>
8424
8425         <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">
8426                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8427                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8428                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8429                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8430                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8431                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8432                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8433                 </fields>
8434                 <links>
8435                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8436                 </links>
8437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8438                         <actions>
8439                                 <retrieve/>
8440                         </actions>
8441                 </permacrud>
8442         </class>
8443
8444         <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">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8446                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8447                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8448                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8449                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8450                 </fields>
8451                 <links>
8452                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8453                 </links>
8454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8455                         <actions>
8456                                 <retrieve/>
8457                         </actions>
8458                 </permacrud>
8459         </class>
8460
8461         <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">
8462                 <fields oils_persist:primary="code">
8463                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8464                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8465                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8466                 </fields>
8467                 <links/>
8468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469                         <actions>
8470                                 <retrieve/>
8471                         </actions>
8472                 </permacrud>
8473         </class>
8474
8475         <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">
8476                 <oils_persist:source_definition>
8477
8478             SELECT  b.id,
8479                     MAX(dcp.edit_date) AS last_delete_date
8480              FROM   biblio.record_entry b
8481                     JOIN asset.call_number cn ON (cn.record = b.id)
8482                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8483              WHERE  NOT b.deleted
8484              GROUP BY b.id
8485              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8486
8487                 </oils_persist:source_definition>
8488                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8489                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8490                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8491                 </fields>
8492                 <links>
8493                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8494                 </links>
8495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8496                         <actions>
8497                                 <retrieve/>
8498                         </actions>
8499                 </permacrud>
8500         </class>
8501
8502         <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">
8503                 <oils_persist:source_definition>
8504
8505             -- -- 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.
8506             -- -- 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
8507             -- -- may not.
8508             -- SELECT
8509             --     bre.id AS "bib_id",
8510             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8511             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8512             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8513             -- FROM (
8514                 SELECT
8515                     y.bre AS "id",
8516                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8517                     y.hold_count AS "hold_count",
8518                     (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"
8519                 FROM (
8520                         SELECT
8521                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8522                             COUNT(*) AS "hold_count"
8523                         FROM action.hold_request h
8524                         WHERE
8525                             cancel_time IS NULL
8526                             AND fulfillment_time IS NULL
8527                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8528                         GROUP BY 1
8529                     )y LEFT JOIN (
8530                         SELECT 
8531                             (SELECT id
8532                                 FROM biblio.record_entry 
8533                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8534                             ) AS "bre", 
8535                             COUNT(*) AS "copy_count"
8536                         FROM asset.copy
8537                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8538                         WHERE copy.holdable 
8539                             AND NOT copy.deleted 
8540                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8541                         GROUP BY 1
8542                     )x ON x.bre = y.bre
8543                 -- )z RIGHT JOIN (
8544                 --     SELECT id
8545                 --     FROM biblio.record_entry
8546                 --     WHERE NOT deleted
8547                 -- )bre ON (z.bib_id = bre.id)
8548                 
8549
8550                 </oils_persist:source_definition>
8551                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8552                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8553                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8554                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8555                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8556                 </fields>
8557                 <links>
8558                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8559                 </links>
8560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8561                         <actions>
8562                                 <retrieve/>
8563                         </actions>
8564                 </permacrud>
8565         </class>
8566
8567         <!-- ********************************************************************************************************************* -->
8568         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8569         <!-- ********************************************************************************************************************* -->
8570         <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">
8571                 <fields oils_persist:primary="id">
8572                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8573                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8574                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8575                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8576                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8577                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8578                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8579                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8580                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8581                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8582                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8583                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8584                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8585                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8586                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8587                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8588                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8589                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8590                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8591                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8592                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8593                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8594                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8595                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8596                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8597                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8598                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8599                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8600                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8601                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8602                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8603                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8604                 </fields>
8605                 <links>
8606                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8607                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8608                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8609                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8610                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8611                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8612                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8613                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8614                 </links>
8615         </class>
8616
8617         <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">
8618                 <fields oils_persist:primary="id">
8619                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8620                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8621                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8622                 </fields>
8623                 <links>
8624                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8625                 </links>
8626         </class>
8627
8628         <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">
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="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">
8640                 <fields oils_persist:primary="id">
8641                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8642
8643                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8644                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8645                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8646
8647                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8648                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8649                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8650
8651                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8652                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8653
8654                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8655                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8656                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8657
8658                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8659                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8660
8661                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8662                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8663                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8664
8665                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8666                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8667                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8668
8669                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8670                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8671                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8672                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8673
8674                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8675                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8676
8677                 </fields>
8678                 <links>
8679                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8681                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8682                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8683                 </links>
8684         </class>
8685
8686         <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">
8687                 <oils_persist:source_definition>
8688
8689             SELECT
8690                 po.ordering_agency AS ordering_agency,
8691                 po.id AS purchase_order,
8692                 li.id AS lineitem,
8693                 lid.id AS lineitem_detail,
8694                 cpa.id AS claim_policy_action
8695             FROM
8696                 acq.lineitem_detail lid
8697                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8698                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8699                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8700                 JOIN acq.claim_policy_action cpa ON (
8701                     cpa.claim_policy = cp.id
8702
8703                     -- we only care about claim policy actions whose claim
8704                     -- interval we'd reached or exceeded
8705                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8706
8707                     -- filter out all claim policy actions where claim events
8708                     -- have occurred on or after the action's action_interval
8709                     AND NOT EXISTS (
8710                         SELECT 1
8711                         FROM
8712                             acq.claim_event evt
8713                             JOIN acq.claim claim ON (
8714                                 claim.id = evt.claim
8715                                 AND claim.lineitem_detail = lid.id
8716                             )
8717                         WHERE
8718                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8719                     )
8720                 )
8721             WHERE
8722                 lid.cancel_reason IS NULL
8723                 AND li.cancel_reason IS NULL -- belt/suspenders
8724                 AND po.cancel_reason IS NULL -- belt/suspenders
8725                 AND lid.recv_time IS NULL
8726                 AND po.state = 'on-order'
8727             ORDER BY 1, 2, 3, 4, 5
8728
8729                 </oils_persist:source_definition>
8730                 <fields>
8731                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8732                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8733                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8734                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8735                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8736                 </fields>
8737                 <links>
8738                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8739                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8740                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8741                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8742                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8743                 </links>
8744         </class>
8745
8746         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8747                 <oils_persist:source_definition>
8748
8749             SELECT 
8750                 li.id AS lineitem, 
8751                 (
8752                     SELECT COUNT(lid.id) 
8753                     FROM acq.lineitem_detail lid
8754                     WHERE lineitem = li.id
8755                 ) AS item_count,
8756                 (
8757                     SELECT COUNT(lid.id) 
8758                     FROM acq.lineitem_detail lid
8759                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8760                 ) AS recv_count,
8761                 (
8762                     SELECT COUNT(lid.id) 
8763                     FROM acq.lineitem_detail lid
8764                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8765                 ) AS cancel_count,
8766                 (
8767                     SELECT COUNT(lid.id) 
8768                     FROM acq.lineitem_detail lid
8769                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8770                     WHERE NOT debit.encumbrance AND lineitem = li.id
8771                 ) AS invoice_count,
8772                 (
8773                     SELECT COUNT(DISTINCT(lid.id)) 
8774                     FROM acq.lineitem_detail lid
8775                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8776                     WHERE lineitem = li.id
8777                 ) AS claim_count,
8778                 (
8779                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8780                     FROM acq.lineitem_detail lid
8781                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8782                 ) AS estimated_amount,
8783                 (
8784                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8785                     FROM acq.lineitem_detail lid
8786                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8787                     WHERE debit.encumbrance AND lineitem = li.id
8788                 ) AS encumbrance_amount,
8789                 (
8790                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8791                     FROM acq.lineitem_detail lid
8792                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8793                     WHERE NOT debit.encumbrance AND lineitem = li.id
8794                 ) AS paid_amount
8795
8796                 FROM acq.lineitem AS li
8797         </oils_persist:source_definition>
8798                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8799                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8800                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8801                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8802                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8803                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8804                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8805                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8806                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8807                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8808                 </fields>
8809                 <links>
8810                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8811                 </links>
8812     </class>
8813
8814
8815         <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">
8816                 <oils_persist:source_definition>
8817
8818                         SELECT  t.*
8819                           FROM  action.transit_copy t
8820                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8821                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8822                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8823
8824                 </oils_persist:source_definition>
8825                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8826                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8827                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8828                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8829                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8830                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8831                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8832                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8833                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8834                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8835                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8836                 </fields>
8837                 <links>
8838                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8839                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8840                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8841                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8842                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8843                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8844                 </links>
8845         </class>
8846
8847     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8848                 <oils_persist:source_definition>
8849
8850         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8851                 SELECT
8852                         cp.id as copy,
8853                         COUNT(circ.id),
8854                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8855                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8856                 FROM
8857                         asset.copy cp
8858                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8859                 GROUP BY 1, 3, 4
8860                 UNION
8861                 SELECT
8862                         cp.id as copy,
8863                         COUNT(circ.id),
8864                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8865                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8866                 FROM
8867                         asset.copy cp
8868                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8869                 GROUP BY 1, 3, 4
8870                 UNION
8871                 SELECT
8872                         id as copy,
8873                         circ_count,
8874                         -1 AS year,
8875                         false as is_renewal
8876                 FROM
8877                         extend_reporter.legacy_circ_count
8878         )x GROUP BY 1, 3, 4
8879
8880                 </oils_persist:source_definition>
8881         <fields>
8882             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8883             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8884             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8885             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8886         </fields>
8887                 <links>
8888                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8889                 </links>
8890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8891                         <actions>
8892                                 <retrieve/>
8893                         </actions>
8894                 </permacrud>
8895     </class>
8896
8897         <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">
8898                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8899                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8900                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8901                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8902                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8903                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8904                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8905                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8906                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8907                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8908                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8909                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8910                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8911                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8912                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8913                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8914                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8915                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8916                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8917                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8918                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8919                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8920                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8921                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8922                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8923                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8924                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8925                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8926                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8927                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8928                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8929                 </fields>
8930                 <links>
8931                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8932                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8933                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8934                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8935                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8936                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8937                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8938                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8939                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8940                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8941                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8942                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8943                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8944                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8945                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8946                 </links>
8947         </class>
8948
8949     <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">
8950         <fields oils_persist:primary="id">
8951             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8952             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8953             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8954             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8955             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8956             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8957             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8958             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8959             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8960             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8961             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8962             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8963             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8964             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8965             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8966             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8967             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8968             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8969             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8970             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8971             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8972             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8973             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8974             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8975             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8976             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8977             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8978             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8979             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8980             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8981             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8982             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8983             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8984             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8985         </fields>
8986         <links>
8987             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8988             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8989             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8990             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8991             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8992         </links>
8993     </class>
8994
8995     <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">
8996         <fields oils_persist:primary="id">
8997             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8998             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8999             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9000             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9001         </fields>
9002         <links>
9003             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9004             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9005         </links>
9006     </class>
9007
9008     <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">
9009         <fields oils_persist:primary="owning_lib">
9010             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9011             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9012             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9013         </fields>
9014         <links>
9015             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9016         </links>
9017     </class>
9018
9019     <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">
9020         <fields oils_persist:primary="id">
9021             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9022             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9023             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9024             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9025             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9026         </fields>
9027         <links>
9028             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9029             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9030             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9031         </links>
9032     </class>
9033
9034     <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">
9035         <fields oils_persist:primary="circ_lib">
9036             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9037             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9038             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9039             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9040         </fields>
9041         <links>
9042             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9043             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9044         </links>
9045     </class>
9046
9047     <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">
9048         <fields oils_persist:primary="id">
9049             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9050             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9051             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9052             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9053             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9054         </fields>
9055         <links>
9056             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9057             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9058             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9059         </links>
9060     </class>
9061
9062     <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">
9063         <fields oils_persist:primary="home_ou">
9064             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9065             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9066             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9067             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9068         </fields>
9069         <links>
9070             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9071             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9072         </links>
9073     </class>
9074         <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">
9075                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9076                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9077                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9078                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9079                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9080                 </fields>
9081                 <links>
9082                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9083                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9084                 </links>
9085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9086                         <actions>
9087                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9088                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9089                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9090                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9091                         </actions>
9092                 </permacrud>
9093         </class>
9094         <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">
9095                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9096                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9097                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9098                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9099                 </fields>
9100                 <links>
9101                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9102                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9103                         </links>
9104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9105                 <actions>
9106                                 <create permission="ADMIN_ACQ_FUND_TAG">
9107                                         <context link="tag" field="owner"/>
9108                                 </create>
9109                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9110                                         <context link="tag" field="owner"/>
9111                                 </retrieve>
9112                                 <update permission="ADMIN_ACQ_FUND_TAG">
9113                                         <context link="tag" field="owner"/>
9114                                 </update>
9115                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9116                                         <context link="tag" field="owner"/>
9117                                 </delete>
9118                         </actions>
9119                 </permacrud>
9120         </class>
9121         <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">
9122                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9123                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9124                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9125                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9126                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9127                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9128                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9129                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9130                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9131                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9132                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9133                 </fields>
9134                 <links>
9135                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9136                 </links>
9137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9138                         <actions>
9139                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9140                                 <retrieve/>
9141                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9142                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9143                         </actions>
9144                 </permacrud>
9145         </class>
9146
9147         <!-- ********************************************************************************************************************* -->
9148
9149 </IDL>
9150
9151 <!--
9152     vim:noet:ts=4:sw=4:
9153 -->