]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
lp758945: make receipt template macros repeatable
[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="billing_location" reporter:datatype="link"/>
2533                 </fields>
2534                 <links>
2535                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2536                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2537                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2538                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2539                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2540                 </links>
2541         </class>
2542         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2544                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2545                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2546                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2547                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2548                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2549                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2550                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2556                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2557                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2558                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2559                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2560                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2561                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2562                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2563                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2564                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2565                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2566                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2567                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2568                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2569                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2570                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2571                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2572                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2573                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2574                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2575                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2576                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2577                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2578                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2579                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2580                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2581                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2582                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2583                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2584                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2585                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2586                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2587                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2588                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2589                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2590                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2591                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2592                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2593                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2594                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2595                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2596                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2597                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2598                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2605                 </fields>
2606                 <links>
2607                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2608                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2609                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2610                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2611                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2612                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2613                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2614                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2615                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2616                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2617                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2618                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2619                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2620                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2621                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2622                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2623                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2624                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2625                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2626                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2627                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2628                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2629                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2630                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2631                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2632                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2633                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2634                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2635                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2636                 </links>
2637         </class>
2638
2639         <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">
2640                 <fields oils_persist:primary="name">
2641                         <field name="name" reporter:datatype="text"/>
2642                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2643                 </fields>
2644                 <links/>
2645                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2646                         <actions>
2647                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2648                                 <retrieve/>
2649                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2650                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2651                         </actions>
2652                 </permacrud>
2653         </class>
2654         <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">
2655                 <fields oils_persist:primary="name">
2656                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2657                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2658                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2659                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2660                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2661                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2662                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2663                 </fields>
2664                 <links>
2665                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2666                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2667                 </links>
2668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2669                         <actions>
2670                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2671                                 <retrieve/>
2672                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2673                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2674                         </actions>
2675                 </permacrud>
2676         </class>
2677         <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">
2678                 <fields oils_persist:primary="name">
2679                         <field name="name" reporter:datatype="text"/>
2680                         <field name="label" reporter:datatype="text"/>
2681                         <field name="description" reporter:datatype="text"/>
2682                         <field name="datatype" reporter:datatype="text"/>
2683                         <field name="view_perm" reporter:datatype="link"/>
2684                         <field name="update_perm" reporter:datatype="link"/>
2685                         <field name="fm_class" reporter:datatype="text"/>
2686                         <field name="grp" reporter:datatype="link"/>
2687                 </fields>
2688                 <links>
2689                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2690                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2691                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2692                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2693                 </links>
2694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2695                         <actions>
2696                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2697                                 <retrieve/>
2698                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2699                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2700                         </actions>
2701                 </permacrud>
2702         </class>
2703         <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">
2704                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2705                         <field name="id" />
2706                         <field name="name"  reporter:datatype="text"/>
2707                         <field name="org_unit" reporter:datatype="org_unit"/>
2708                         <field name="value"  reporter:datatype="text"/>
2709                 </fields>
2710                 <links>
2711                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2712                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2713                 </links>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2717                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2718                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2719                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2720                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2721                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2722                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2723                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2724                 </fields>
2725                 <links>
2726                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2728                 </links>
2729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2730             <actions>
2731                 <create permission="CREATE_COPY_NOTE">
2732                     <context link="owning_copy" field="circ_lib"/>
2733                 </create>
2734                 <retrieve permission="VIEW_COPY_NOTES">
2735                     <context link="owning_copy" field="circ_lib"/>
2736                 </retrieve>
2737                 <update permission="UPDATE_COPY_NOTE">
2738                     <context link="owning_copy" field="circ_lib"/>
2739                 </update>
2740                 <delete permission="DELETE_COPY_NOTE">
2741                     <context link="owning_copy" field="circ_lib"/>
2742                 </delete>
2743             </actions>
2744         </permacrud>
2745         </class>
2746         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2747                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2748                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2749                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2750                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2751                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2752                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2753                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2754                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2755                 </fields>
2756                 <links>
2757                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2758                 </links>
2759         </class>
2760         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2761                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2762                         <field name="fingerprint"  reporter:datatype="text"/>
2763                         <field name="id" reporter:datatype="id" />
2764                         <field name="master_record" reporter:datatype="link"/>
2765                         <field name="mods"  reporter:datatype="text"/>
2766                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2767                 </fields>
2768                 <links>
2769                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2770                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2771                 </links>
2772         </class>
2773         <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">
2774                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2775                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2776                         <field name="name"  reporter:datatype="text"/>
2777                 </fields>
2778                 <links/>
2779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2780             <actions>
2781                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2782                 <retrieve/>
2783                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2784                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2785             </actions>
2786         </permacrud>
2787         </class>
2788         <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">
2789                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2790                         <field name="code"  reporter:datatype="text"/>
2791                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2792                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2793                 </fields>
2794                 <links/>
2795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2796             <actions>
2797                 <create permission="CREATE_PERM" global_required="true"/>
2798                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2799                 <update permission="UPDATE_PERM" global_required="true"/>
2800                 <delete permission="DELETE_PERM" global_required="true"/>
2801             </actions>
2802         </permacrud>
2803         </class>
2804         <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">
2805                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2806                         <field name="id" reporter:datatype="id" />
2807                         <field name="metarecord" reporter:datatype="link"/>
2808                         <field name="source" reporter:datatype="link"/>
2809                 </fields>
2810                 <links>
2811                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2812                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2813                 </links>
2814         </class>
2815         <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">
2816                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2817                         <field name="id" reporter:datatype="id" />
2818                         <field name="field" reporter:datatype="link"/>
2819                         <field name="source" reporter:datatype="link"/>
2820                         <field name="value"  reporter:datatype="text"/>
2821                 </fields>
2822                 <links>
2823                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2824                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2825                 </links>
2826         </class>
2827         <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">
2828                 <oils_persist:source_definition>
2829                         SELECT * FROM metabib.author_field_entry
2830                                                 UNION ALL
2831                         SELECT * FROM metabib.keyword_field_entry
2832                                                 UNION ALL
2833                         SELECT * FROM metabib.identifier_field_entry
2834                                                 UNION ALL
2835                         SELECT * FROM metabib.title_field_entry
2836                                                 UNION ALL
2837                         SELECT * FROM metabib.subject_field_entry
2838                                                 UNION ALL
2839                         SELECT * FROM metabib.series_field_entry
2840                 </oils_persist:source_definition>
2841                 <fields>
2842                         <field name="field" reporter:datatype="link"/>
2843                         <field name="id" reporter:datatype="id" />
2844                         <field name="source" reporter:datatype="link"/>
2845                         <field name="value"  reporter:datatype="text"/>
2846                 </fields>
2847                 <links>
2848                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2849                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2850                 </links>
2851         </class>
2852         <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">
2853                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2854                         <field name="field" reporter:datatype="link"/>
2855                         <field name="id" reporter:datatype="id" />
2856                         <field name="source" reporter:datatype="link"/>
2857                         <field name="value"  reporter:datatype="text"/>
2858                 </fields>
2859                 <links>
2860                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2861                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2862                 </links>
2863         </class>
2864         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2865                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2866                         <field name="accepting_usr" reporter:datatype="link"/>
2867                         <field name="amount" reporter:datatype="money" />
2868                         <field name="amount_collected" reporter:datatype="money" />
2869                         <field name="cash_drawer" reporter:datatype="link"/>
2870                         <field name="id" reporter:datatype="id" />
2871                         <field name="note"  reporter:datatype="text"/>
2872                         <field name="payment_ts" reporter:datatype="timestamp"/>
2873                         <field name="xact" reporter:datatype="link"/>
2874                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2875                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2876                 </fields>
2877                 <links>
2878                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2879                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2880                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2881                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2882                 </links>
2883         </class>
2884         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2885                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2886                         <field name="accepting_usr" reporter:datatype="link"/>
2887                         <field name="amount" reporter:datatype="money" />
2888                         <field name="amount_collected" reporter:datatype="money" />
2889                         <field name="id" reporter:datatype="id" />
2890                         <field name="note"  reporter:datatype="text"/>
2891                         <field name="payment_ts" reporter:datatype="timestamp"/>
2892                         <field name="xact" reporter:datatype="link"/>
2893                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2894                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2895                 </fields>
2896                 <links>
2897                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2898                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2899                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2900                 </links>
2901         </class>
2902         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2903                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2904                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2905                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2906                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2907                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2908                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2909                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2910                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2911                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2912                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2913                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2914                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2915                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2916                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2917                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2918                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2919                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2920                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2921                 </fields>
2922                 <links>
2923                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2924                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2925                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2926                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2927                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2928                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2929                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2930                 </links>
2931         </class>
2932
2933         <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">
2934                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2935                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2936                         <field name="name"  reporter:datatype="text"/>
2937                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2938                         <field name="block_list" reporter:datatype="text"/>
2939                         <field name="org_depth" reporter:datatype="int"/>
2940                 </fields>
2941                 <links/>
2942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2943             <actions>
2944                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2945                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2946                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2947                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2948             </actions>
2949         </permacrud>
2950         </class>
2951         <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">
2952                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2953                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2954                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2955                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2956                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2957                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2958                 </fields>
2959                 <links>
2960                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2961                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2962                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2963         </links>
2964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2965             <actions>
2966                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2967                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2968                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2969                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2970             </actions>
2971         </permacrud>
2972         </class>
2973         <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">
2974                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2975                         <field name="holdable" reporter:datatype="bool"/>
2976                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2977                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2978                         <field name="opac_visible" reporter:datatype="bool"/>
2979             <field name="copy_active" reporter:datatype="bool"/>
2980                 </fields>
2981                 <links/>
2982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2983             <actions>
2984                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2985                 <retrieve/>
2986                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2987                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2988             </actions>
2989         </permacrud>
2990         </class>
2991         <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">
2992                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2993                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2994                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2995                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2996                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2997                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2998                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2999                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3000                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3001                 </fields>
3002                 <links>
3003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3004                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3005                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3006                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3007                 </links>
3008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3009                         <actions>
3010                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3011                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3012                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3013                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3014                         </actions>
3015                 </permacrud>
3016         </class>
3017         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3019                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3020                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3021                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3022                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3023                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3024                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3025                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3026                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3027                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3028                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3029                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3030                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3031                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3032                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3033                 </fields>
3034                 <links>
3035                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3037                 </links>
3038         </class>
3039
3040         <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">
3041                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3042                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3043                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3044                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3045                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3046                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3047                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3048                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3049                 </fields>
3050                 <links>
3051                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3052                 </links>
3053         </class>
3054
3055         <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">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3057                         <field name="call_number" />
3058                         <field name="create_date" reporter:datatype="timestamp"/>
3059                         <field name="creator" reporter:datatype="link"/>
3060                         <field name="id" reporter:datatype="id" />
3061                         <field name="pub" reporter:datatype="bool"/>
3062                         <field name="title"  reporter:datatype="text"/>
3063                         <field name="value"  reporter:datatype="text"/>
3064                 </fields>
3065                 <links>
3066                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3067                 </links>
3068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3069             <actions>
3070                 <create permission="CREATE_VOLUME_NOTE">
3071                     <context link="call_number" field="owning_lib"/>
3072                 </create>
3073                 <retrieve permission="VIEW_VOLUME_NOTES">
3074                     <context link="call_number" field="owning_lib"/>
3075                 </retrieve>
3076                 <update permission="UPDATE_VOLUME_NOTE">
3077                     <context link="call_number" field="owning_lib"/>
3078                 </update>
3079                 <delete permission="DELETE_VOLUME_NOTE">
3080                     <context link="call_number" field="owning_lib"/>
3081                 </delete>
3082             </actions>
3083         </permacrud>
3084         </class>
3085         <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">
3086                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3087                         <field name="create_date" reporter:datatype="timestamp"/>
3088                         <field name="creator" reporter:datatype="link"/>
3089                         <field name="edit_date" reporter:datatype="timestamp"/>
3090                         <field name="editor" reporter:datatype="link"/>
3091                         <field name="id" reporter:datatype="id" />
3092                         <field name="record" reporter:datatype="link"/>
3093                         <field name="value" reporter:datatype="text"/>
3094                 </fields>
3095                 <links>
3096                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3097                 </links>
3098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099             <actions>
3100                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3101                 <retrieve/>
3102                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3103                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3108         <oils_persist:source_definition>
3109 SELECT  usr,
3110         SUM(
3111             CASE
3112                 WHEN (
3113                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3114                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3115                 ) THEN 1
3116                 ELSE 0
3117             END
3118         ) AS out,
3119
3120         SUM(
3121             CASE
3122                 WHEN (
3123                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3124                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3125                 ) THEN 1
3126                 ELSE 0
3127             END
3128         ) AS overdue,
3129
3130         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3131         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3132         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3133   FROM  action.circulation
3134   WHERE checkin_time IS NULL
3135   GROUP BY 1
3136         </oils_persist:source_definition>
3137         <fields oils_persist:primary="usr">
3138             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3139             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3140             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3141             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3142             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3143             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3144         </fields>
3145         <links>
3146             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3147         </links>
3148         </class>
3149         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3150         <oils_persist:source_definition>
3151 SELECT  usr,
3152         ARRAY_TO_STRING(ARRAY_ACCUM(
3153             CASE
3154                 WHEN (
3155                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3156                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3157                 ) THEN id
3158                 ELSE 0
3159             END
3160         ),',') AS out,
3161
3162         ARRAY_TO_STRING(ARRAY_ACCUM(
3163             CASE
3164                 WHEN (
3165                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3166                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3167                 ) THEN id
3168                 ELSE 0
3169             END
3170         ),',') AS overdue,
3171
3172         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3173         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3174         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3175   FROM  action.circulation
3176   WHERE checkin_time IS NULL
3177   GROUP BY 1
3178         </oils_persist:source_definition>
3179         <fields oils_persist:primary="usr">
3180             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3181             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3182             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3183             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3184             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3185             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3186         </fields>
3187         <links>
3188             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3189         </links>
3190         </class>
3191         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3192                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3193                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3194                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3195                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3196                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3197                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3198                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3199                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3200                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3201                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3202                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3203                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3204                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3205                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3206                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3207                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3208                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3209                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3210                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3211                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3212                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3213                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3214                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3215                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3216                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3217                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3218                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3219                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3220                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3221                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3222                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3223                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3227                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3228                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3229                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3230                 </fields>
3231                 <links>
3232                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3233                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3234                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3235                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3236                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3238                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3239                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3240                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3241                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3242                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3243                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3244                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3245                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3246                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3247                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3248                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3249                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3250                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3251                 </links>
3252         </class>
3253         <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">
3254                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3255                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3256                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3257                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3258                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3259                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3260                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3261                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3262                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3263                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3264                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3265                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3266                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3267                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3268                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3269                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3270                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3271                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3272                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3273                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3274                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3275                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3276                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3277                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3278                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3279                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3280                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3281                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3282                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3283                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3284                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3285                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3286                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3287                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3288                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3289                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3290                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3291                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3292                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3293                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3294                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3295                 </fields>
3296                 <links>
3297                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3298                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3299                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3300                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3301                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3302                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3303                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3304                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3305                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3306                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3307                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3308                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3309                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3310                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3311                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3312                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3313                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3314                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3315                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3316                 </links>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3320                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3321                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3322                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3323                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3324                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3325                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3326                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3327                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3328                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3329                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3330                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3331                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3332                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3333                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3334                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3335                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3336                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3337                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3338                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3339                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3340                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3341                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3342                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3343                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3344                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3345                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3346                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3347                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3348                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3349                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3350                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3351                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3352                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3353                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3354                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3355                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3356                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3357                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3358                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3359                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3360                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3361                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3362                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3363                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3364                 </fields>
3365                 <links>
3366                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3367                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3368                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3369                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3370                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3371                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3372                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3373                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3374                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3375                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3376                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3377                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3378                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3379                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3380                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3381                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3382                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3383                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3384                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3385                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3386                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3387                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3388                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3389                 </links>
3390         </class>
3391
3392         <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">
3393                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3394                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3395                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3396                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3397                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3398                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3399                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3400                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3401                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3402                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3403                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3404                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3405                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3406                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3407                 </fields>
3408                 <links>
3409                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3410                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3411                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3412                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3413                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3414                 </links>
3415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3416                         <actions>
3417                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3418                                 <retrieve />
3419                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3420                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
3421                         </actions>
3422                 </permacrud>
3423         </class>
3424
3425         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3427                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3428                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3429                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3430                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3431                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3432                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3434                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3435                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3436                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3437                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3438                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3439                 </fields>
3440                 <links>
3441                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3442                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3443                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3444                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3445                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3446                 </links>
3447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3448                         <actions>
3449                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3450                                 <retrieve />
3451                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3452                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
3453                         </actions>
3454                 </permacrud>
3455         </class>
3456         
3457         <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">
3458                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3459                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3460                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3461                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3462                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3463                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3464                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3465                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3466                 </fields>
3467                 <links>
3468                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3469                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3470                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3471                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3472                 </links>
3473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3474                         <actions>
3475                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3476                                 <retrieve />
3477                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3478                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
3479                         </actions>
3480                 </permacrud>
3481         </class>
3482         
3483         <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">
3484                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3485                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3486                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3487                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3488                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3489                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3490                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3491                 </fields>
3492                 <links>
3493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3494                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3495                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3496                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3497                 </links>
3498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3499                         <actions>
3500                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3501                                 <retrieve />
3502                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3503                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
3504                         </actions>
3505                 </permacrud>
3506         </class>
3507         
3508         <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">
3509                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3510                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3511                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3512                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3513                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3514                 </fields>
3515                 <links>
3516                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3517                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3518                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3519                 </links>
3520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3521                         <actions>
3522                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3523                                 <retrieve />
3524                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3525                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
3526                         </actions>
3527                 </permacrud>
3528         </class>
3529         
3530         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3531                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3532                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3533                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3534                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3535                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3536                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3537                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3538                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3539                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3540                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3541                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3542                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3543                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3544                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3545                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3546                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3547                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3548                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3549                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3550                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3551                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3552                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3553                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3554                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3555                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3556                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3557                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3558                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3559                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3560                 </fields>
3561                 <links>
3562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3563                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3564                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3565                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3566                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3567                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3568                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3569                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3570                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3571                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3572                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3573                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3574                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3575                 </links>
3576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3577                         <actions>
3578                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3579                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3580                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3581                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3582                         </actions>
3583                 </permacrud>
3584         </class>
3585         
3586         <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">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3588                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3589                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3590                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3591                 </fields>
3592                 <links>
3593                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3594                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3595                 </links>
3596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3597                         <actions>
3598                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3599                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3600                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3601                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3602                         </actions>
3603                 </permacrud>
3604         </class>
3605
3606         <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">
3607                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3608                         <field name="bucket" reporter:datatype="link"/>
3609                         <field name="id" reporter:datatype="id" />
3610                         <field name="target_call_number" reporter:datatype="link" />
3611                         <field name="create_time" reporter:datatype="timestamp" />
3612                         <field name="pos" reporter:datatype="int" />
3613                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3614                 </fields>
3615                 <links>
3616                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3617                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3618             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3619                 </links>
3620         </class>
3621         <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">
3622                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3623                         <field name="id" reporter:datatype="id" />
3624                         <field name="item" reporter:datatype="link"/>
3625                         <field name="note" reporter:datatype="text" />
3626                 </fields>
3627                 <links>
3628                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3629                 </links>
3630         </class>
3631         <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">
3632                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3633                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field name="btype" reporter:datatype="text"/>
3635                         <field name="id" reporter:datatype="id" />
3636                         <field name="name" reporter:datatype="text"/>
3637                         <field name="owner" reporter:datatype="link"/>
3638                         <field name="pub" reporter:datatype="bool"/>
3639                         <field name="create_time" reporter:datatype="timestamp" />
3640                 </fields>
3641                 <links>
3642                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3643                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3644                 </links>
3645         </class>
3646         <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">
3647                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3648                         <field name="id" reporter:datatype="id" />
3649                         <field name="bucket" reporter:datatype="link"/>
3650                         <field name="note" reporter:datatype="text" />
3651                 </fields>
3652                 <links>
3653                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3654                 </links>
3655         </class>
3656         <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">
3657                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3658                         <field name="hold" reporter:datatype="link"/>
3659                         <field name="id" reporter:datatype="id" />
3660                         <field name="target_copy" reporter:datatype="link"/>
3661                 </fields>
3662                 <links>
3663                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3664                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3665                 </links>
3666         </class>
3667         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3669                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3670                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3671                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3672                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3673                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3674                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3675                 </fields>
3676                 <links>
3677                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3678                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3679                 </links>
3680         </class>
3681         <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">
3682                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3683                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3684                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3685                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3686                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3687                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3688                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3689                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3690                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3691                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3693                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3694                 </fields>
3695                 <links>
3696                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3697                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3698                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3699                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3700                 </links>
3701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3702             <actions>
3703                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3704                 <retrieve/>
3705                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3706                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3707             </actions>
3708         </permacrud>
3709         </class>
3710
3711     <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">
3712         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3713             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3714             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3715             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3716             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3717         </fields>
3718         <links>
3719             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3720             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3721         </links>
3722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3723             <actions>
3724                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3725                 <retrieve/>
3726                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3727                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3728             </actions>
3729         </permacrud>
3730     </class>
3731
3732         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3733                 <fields>
3734                         <field name="sre_id" oils_persist:virtual="true" />
3735                         <field name="location" oils_persist:virtual="true" />
3736                         <field name="owning_lib" oils_persist:virtual="true" />
3737                         <field name="basic_holdings" oils_persist:virtual="true" />
3738                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3739                         <field name="supplement_holdings" oils_persist:virtual="true" />
3740                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3741                         <field name="index_holdings" oils_persist:virtual="true" />
3742                         <field name="index_holdings_add" oils_persist:virtual="true" />
3743                         <field name="online" oils_persist:virtual="true" />
3744                         <field name="missing" oils_persist:virtual="true" />
3745                         <field name="incomplete" oils_persist:virtual="true" />
3746                 </fields>
3747         </class>
3748
3749         <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">
3750                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3751                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3752                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3753                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3755                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3756                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3757                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3758                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3759                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3760                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3761                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3762                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3763                 </fields>
3764                 <links>
3765                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3766                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3767                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3768                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3769                 </links>
3770                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3771                         <actions>
3772                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3773                                 <retrieve/>
3774                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3775                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779
3780         <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">
3781                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3783                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3784                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3785                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3786                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3787                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3788                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3789                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3790                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3791                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3792                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3793                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3794                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3795                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3796                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3797                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3798                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3799                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3800                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3801                 </fields>
3802                 <links>
3803                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3804                 </links>
3805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806                         <actions>
3807                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3808                                         <context link="subscription" field="owning_lib" />
3809                                 </create>
3810                                 <retrieve />
3811                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3812                                         <context link="subscription" field="owning_lib" />
3813                                 </update>
3814                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3815                                         <context link="subscription" field="owning_lib" />
3816                                 </delete>
3817                         </actions>
3818                 </permacrud>
3819         </class>
3820
3821         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3822                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3824                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3825                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3826                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3827                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3828                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3829                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3830                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3831                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3832                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3833                 </fields>
3834                 <links>
3835                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3836                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3837                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3838                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3839                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3840                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3841                 </links>
3842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3843                         <actions>
3844                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3845                                 <retrieve />
3846                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3847                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3848                         </actions>
3849                 </permacrud>
3850         </class>
3851
3852         <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">
3853                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3854                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3855                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3856                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3857                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3858                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3859                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3860                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3861                 </fields>
3862                 <links>
3863                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3864                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3865                 </links>
3866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3867                 </permacrud>
3868         </class>
3869
3870         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3871                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3872                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3873                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3874                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3875                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3876                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3877                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3878                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3879                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3880                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3881                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3882                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3883                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3884                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3885                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3886                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3887                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3888                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3889                 </fields>
3890                 <links>
3891                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3892                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3893                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3894                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3895                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3896                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3897                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3898                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3899                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3900                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3901                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3902                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3903                 </links>
3904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3905                         <actions>
3906                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3907                                 <retrieve />
3908                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3909                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3910                         </actions>
3911                 </permacrud>
3912         </class>
3913
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3916                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3917                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3918                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3919                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3920                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3921                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3922                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3923                 </fields>
3924                 <links>
3925                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3926                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3927                 </links>
3928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3929                         <actions>
3930                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3931                                         <context link="distribution" field="holding_lib" />
3932                                 </create>
3933                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3934                                         <context link="distribution" field="holding_lib" />
3935                                 </retrieve>
3936                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3937                                         <context link="distribution" field="holding_lib" />
3938                                 </update>
3939                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3940                                         <context link="distribution" field="holding_lib" />
3941                                 </delete>
3942                         </actions>
3943                 </permacrud>
3944         </class>
3945
3946         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3947                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3948                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3949                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3950                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3951                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3952                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
3953                 </fields>
3954                 <links>
3955                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3956                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
3957                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
3958                 </links>
3959                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3960                         <actions>
3961                                 <create permission="ADMIN_SERIAL_STREAM">
3962                                         <context link="distribution" field="holding_lib" />
3963                                 </create>
3964                                 <retrieve />
3965                                 <update permission="ADMIN_SERIAL_STREAM">
3966                                         <context link="distribution" field="holding_lib" />
3967                                 </update>
3968                                 <delete permission="ADMIN_SERIAL_STREAM">
3969                                         <context link="distribution" field="holding_lib" />
3970                                 </delete>
3971                         </actions>
3972                 </permacrud>
3973         </class>
3974
3975         <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">
3976                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
3977                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3978                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
3979                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3980                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
3981                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
3982                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3983                 </fields>
3984                 <links>
3985                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
3986                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
3987                 </links>
3988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3989                         <actions>
3990                                 <create permission="ADMIN_SERIAL_STREAM">
3991                                         <context link="stream" jump="distribution" field="holding_lib" />
3992                                 </create>
3993                                 <retrieve permission="RECEIVE_SERIAL">
3994                                         <context link="stream" jump="distribution" field="holding_lib" />
3995                                 </retrieve>
3996                                 <update permission="ADMIN_SERIAL_STREAM">
3997                                         <context link="stream" jump="distribution" field="holding_lib" />
3998                                 </update>
3999                                 <delete permission="ADMIN_SERIAL_STREAM">
4000                                         <context link="stream" jump="distribution" field="holding_lib" />
4001                                 </delete>
4002                         </actions>
4003                 </permacrud>
4004         </class>
4005
4006         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4007                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4008                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4009                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4010                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4011                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4012                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4013                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4014                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4015                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4016                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4017                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4018                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4019                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4020                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4021                 </fields>
4022                 <links>
4023                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4024                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4025                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4026                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4027                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4028                 </links>
4029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4030                         <actions>
4031                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4032                                         <context link="subscription" field="owning_lib" />
4033                                 </create>
4034                                 <retrieve/>
4035                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4036                                         <context link="subscription" field="owning_lib" />
4037                                 </update>
4038                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4039                                         <context link="subscription" field="owning_lib" />
4040                                 </delete>
4041                         </actions>
4042                 </permacrud>
4043         </class>
4044
4045         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4047                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4048                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4049                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4050                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4051                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4052                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4053                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4054                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4055                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4056                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4057                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4058                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4059                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4060                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4061                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4062                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4063                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4064                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4065                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4066                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4067                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4068                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4069                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4070                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4071                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4072                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4073                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4074                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4075                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4076                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4078                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4079                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4080                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4081                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4082                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4083                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4084                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4086                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4088                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4089                 </fields>
4090                 <links>
4091                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4092                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4093                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4094                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4095                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4096                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4097                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4098                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4099                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4100                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4101                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4102                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4103                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4104                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4105                 </links>
4106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4107                         <actions>
4108                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4109                                 <retrieve/>
4110                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4111                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4112                         </actions>
4113                 </permacrud>
4114         </class>
4115
4116         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4117                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4118                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4119                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4120                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4121                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4122                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4123                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4124                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4125                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4126                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4127                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4128                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4129                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4130                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4131                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4132                 </fields>
4133                 <links>
4134                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4136                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4137                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4138                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4139                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4140                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4141                 </links>
4142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4143                         <actions>
4144                                 <create permission="ADMIN_SERIAL_ITEM">
4145                                         <context link="stream" jump="distribution" field="holding_lib" />
4146                                 </create>
4147                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4148                                         <context link="stream" jump="distribution" field="holding_lib" />
4149                                 </retrieve>
4150                                 <update permission="ADMIN_SERIAL_ITEM">
4151                                         <context link="stream" jump="distribution" field="holding_lib" />
4152                                 </update>
4153                                 <delete permission="ADMIN_SERIAL_ITEM">
4154                                         <context link="stream" jump="distribution" field="holding_lib" />
4155                                 </delete>
4156                         </actions>
4157                 </permacrud>
4158         </class>
4159
4160         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4161                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4162                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4163                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4164                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4165                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4166                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4167                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4168                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4169                 </fields>
4170                 <links>
4171                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4173                 </links>
4174                 <!-- Not available via PCRUD at this time -->
4175         </class>
4176
4177         <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">
4178                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4179                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4180                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4181                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4182                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4183                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4184                 </fields>
4185                 <links>
4186                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4187                 </links>
4188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4189                         <actions>
4190                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4191                                         <context link="distribution" field="holding_lib" />
4192                                 </create>
4193                                 <retrieve/>
4194                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4195                                         <context link="distribution" field="holding_lib" />
4196                                 </update>
4197                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4198                                         <context link="distribution" field="holding_lib" />
4199                                 </create>
4200                         </actions>
4201                 </permacrud>
4202         </class>
4203
4204         <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">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4206                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4207                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4208                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4209                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4210                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4211                 </fields>
4212                 <links>
4213                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4214                 </links>
4215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4216                         <actions>
4217                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4218                                         <context link="distribution" field="holding_lib" />
4219                                 </create>
4220                                 <retrieve/>
4221                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4222                                         <context link="distribution" field="holding_lib" />
4223                                 </update>
4224                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4225                                         <context link="distribution" field="holding_lib" />
4226                                 </create>
4227                         </actions>
4228                 </permacrud>
4229         </class>
4230
4231         <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">
4232                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4233                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4234                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4235                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4236                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4237                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4238                 </fields>
4239                 <links>
4240                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4241                 </links>
4242                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4243                         <actions>
4244                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4245                                         <context link="distribution" field="holding_lib" />
4246                                 </create>
4247                                 <retrieve/>
4248                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4249                                         <context link="distribution" field="holding_lib" />
4250                                 </update>
4251                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4252                                         <context link="distribution" field="holding_lib" />
4253                                 </create>
4254                         </actions>
4255                 </permacrud>
4256         </class>
4257
4258         <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">
4259                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4260                         <field name="id" reporter:datatype="id" />
4261                         <field name="owning_copy" reporter:datatype="link"/>
4262                         <field name="stat_cat" reporter:datatype="link"/>
4263                         <field name="stat_cat_entry" reporter:datatype="link"/>
4264                 </fields>
4265                 <links>
4266                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4267                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4268                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4269                 </links>
4270         </class>
4271         <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">
4272                 <fields oils_persist:primary="code">
4273                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4274                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4275                 </fields>
4276                 <links/>
4277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4278             <actions>
4279                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4280                 <retrieve/>
4281                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4282                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4283             </actions>
4284         </permacrud>
4285         </class>
4286         <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">
4287                 <fields oils_persist:primary="code">
4288                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4289                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4290                 </fields>
4291                 <links/>
4292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4293             <actions>
4294                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4295                 <retrieve/>
4296                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4297                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4298             </actions>
4299         </permacrud>
4300         </class>
4301         <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">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4303                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4304                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4305                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4306                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4307                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4308                 </fields>
4309                 <links>
4310             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4311         </links>
4312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4313             <actions>
4314                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4315                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4316                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4317                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4318             </actions>
4319         </permacrud>
4320         </class>
4321         <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">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4323                         <field name="id" reporter:datatype="id" />
4324                         <field name="name" reporter:datatype="text"/>
4325                 </fields>
4326                 <links/>
4327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4328             <actions>
4329                 <create permission="CREATE_LASSO" global_required="true"/>
4330                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4331                 <update permission="UPDATE_LASSO" global_required="true"/>
4332                 <delete permission="DELETE_LASSO" global_required="true"/>
4333             </actions>
4334         </permacrud>
4335         </class>
4336         <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">
4337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4338                         <field name="id" reporter:datatype="id" />
4339                         <field name="lasso" reporter:datatype="link"/>
4340                         <field name="org_unit" reporter:datatype="org_unit"/>
4341                 </fields>
4342                 <links>
4343                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4344                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4345                 </links>
4346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4347             <actions>
4348                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4349                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4350                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4351                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4352             </actions>
4353         </permacrud>
4354         </class>
4355         <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">
4356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4357                         <field name="id" reporter:datatype="id" />
4358                         <field name="from_org" reporter:datatype="org_unit"/>
4359                         <field name="to_org" reporter:datatype="org_unit"/>
4360                         <field name="prox" reporter:datatype="int" />
4361                 </fields>
4362                 <links>
4363                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4364                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4365                 </links>
4366         </class>
4367         <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">
4368                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4369                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4370                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4371                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4372                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4373                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4374                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4375                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4376                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4377                 </fields>
4378                 <links/>
4379         </class>
4380         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4381                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4382                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4383                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4384                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4385                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4386                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4387                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4388                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4389                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4390                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4391                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4392                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4393                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4394                 </fields>
4395                 <links>
4396                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4397                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4398                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4399                 </links>
4400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4401             <actions>
4402                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4403                 <retrieve/>
4404                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4405                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4406             </actions>
4407         </permacrud>
4408         </class>
4409         <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">
4410                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4411                         <field name="address_type"  reporter:datatype="text"/>
4412                         <field name="city"  reporter:datatype="text"/>
4413                         <field name="country"  reporter:datatype="text"/>
4414                         <field name="county"  reporter:datatype="text"/>
4415                         <field name="id" reporter:datatype="id" />
4416                         <field name="org_unit" reporter:datatype="org_unit"/>
4417                         <field name="post_code"  reporter:datatype="text"/>
4418                         <field name="state"  reporter:datatype="text"/>
4419                         <field name="street1"  reporter:datatype="text"/>
4420                         <field name="street2"  reporter:datatype="text"/>
4421                         <field name="valid" reporter:datatype="bool"/>
4422                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4423                 </fields>
4424                 <links>
4425                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4426                 </links>
4427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4428             <actions>
4429                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4430                 <retrieve/>
4431                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4432                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4433             </actions>
4434         </permacrud>
4435         </class>
4436         <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">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4438                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4439                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4440                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4441                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4442                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4443                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4444                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4445                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4446                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4447                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4448                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4449                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4450                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4451                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4452                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4453                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4454                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4455                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4456                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4457                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4458                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4459                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4460                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4461                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4462                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4463                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4464                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4465                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4466                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4467                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4468                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4469                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4470                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4471                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4472                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4473                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4475                 </fields>
4476                 <links>
4477                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4478                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4479                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4480                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4481                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4482                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4483                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4484                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4485                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4486                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4487                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4488                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4489                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4490                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4491                 </links>
4492         </class>
4493         <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">
4494                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4496                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4497                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4498                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4499                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4500                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4501                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4502                 </fields>
4503                 <links>
4504                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4505                 </links>
4506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4507                         <actions>
4508                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4509                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4510                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4511                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4512                         </actions>
4513                 </permacrud>
4514         </class>
4515         <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">
4516                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4517                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4518                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4519                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4520                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4521                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4522                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4523                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4524                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4525                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4526                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4527                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4528                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4529                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4530                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4531                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4532                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4533                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4534                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4535                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4538                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4539                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4540                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4541                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4542                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4543                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4544                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4545                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4546                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4547                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4548                 </fields>
4549                 <links>
4550                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4551                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4552                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4553                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4554                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4555                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4556                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4557                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4558                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4559                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4560                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4561                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4562                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4563                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4564                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4565                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4566                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4567                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4568                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4569                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4570                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4571                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4572                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4573                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4574                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4575                 </links>
4576         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4577             <actions>
4578                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4579                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4580                     <context field="id"/>
4581                     <context field="parent_ou"/>
4582                                 </retrieve>
4583                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4584                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4585             </actions>
4586         </permacrud>
4587         </class>
4588         <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">
4589                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4590                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4591                         <field name="btype" reporter:datatype="text"/>
4592                         <field name="id" reporter:datatype="id" />
4593                         <field name="name"  reporter:datatype="text"/>
4594                         <field name="owner" reporter:datatype="link"/>
4595                         <field name="pub" reporter:datatype="bool"/>
4596                         <field name="create_time" reporter:datatype="timestamp" />
4597                 </fields>
4598                 <links>
4599                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4600                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4601                 </links>
4602         </class>
4603         <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">
4604                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4605                         <field name="id" reporter:datatype="id" />
4606                         <field name="bucket" reporter:datatype="link"/>
4607                         <field name="note" reporter:datatype="text" />
4608                 </fields>
4609                 <links>
4610                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4611                 </links>
4612         </class>
4613         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4614                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4615                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4617                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4618                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4619                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4620                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4621                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4622                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4623                 </fields>
4624                 <links>
4625                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4626                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4627                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4628                 </links>
4629         </class>
4630         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4632                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4633                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4634                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4635                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4636                 </fields>
4637                 <links>
4638                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4639                 </links>
4640         </class>
4641     <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">
4642         <fields oils_persist:primary="field">
4643             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4644             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4645             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4646         </fields>
4647         <links/>
4648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4649             <actions>
4650                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4651                 <retrieve />
4652                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4653                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4654             </actions>
4655         </permacrud>
4656     </class>
4657         <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">
4658                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4659                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4661                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4662                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4663                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4664                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4665                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4666                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4667                 </fields>
4668                 <links>
4669                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4670                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4671                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4672                 </links>
4673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4674             <actions>
4675                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4676                 <retrieve />
4677                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4678                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4679             </actions>
4680         </permacrud>
4681         </class>
4682         <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">
4683                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4684                         <field name="field" reporter:datatype="link"/>
4685                         <field name="id" reporter:datatype="id" />
4686                         <field name="source" reporter:datatype="link"/>
4687                         <field name="value"  reporter:datatype="text"/>
4688                 </fields>
4689                 <links>
4690                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4691                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4692                 </links>
4693         </class>
4694         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4695                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4696                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4697                         <field name="btype" reporter:datatype="text"/>
4698                         <field name="id" reporter:datatype="id" />
4699                         <field name="name"  reporter:datatype="text"/>
4700                         <field name="owner" reporter:datatype="link"/>
4701                         <field name="pub" reporter:datatype="bool"/>
4702                         <field name="create_time" reporter:datatype="timestamp" />
4703                 </fields>
4704                 <links>
4705                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4706                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4707                 </links>
4708         </class>
4709         <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">
4710                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4711                         <field name="id" reporter:datatype="id" />
4712                         <field name="bucket" reporter:datatype="link"/>
4713                         <field name="note" reporter:datatype="text" />
4714                 </fields>
4715                 <links>
4716                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4717                 </links>
4718         </class>
4719         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4720                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4721                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4722                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4723                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4724                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4725                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4726                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4727                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4728                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4729                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4730                 </fields>
4731                 <links>
4732                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4733                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4734                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4735                 </links>
4736         </class>
4737         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4738                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4739                         <field name="id" reporter:datatype="id" />
4740                         <field name="ind1" />
4741                         <field name="ind2" />
4742                         <field name="record" />
4743                         <field name="subfield" />
4744                         <field name="tag" />
4745                         <field name="value" />
4746                 </fields>
4747                 <links>
4748                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4749                 </links>
4750         </class>
4751         <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">
4752                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4753                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4754                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4755                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4756                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4757                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4758                 </fields>
4759                 <links>
4760                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4761                 </links>
4762         </class>
4763         <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">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4765                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4767                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4768                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4769                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4770                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4771                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4772                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4773                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4774                 </fields>
4775                 <links>
4776                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4777                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4778                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4779                 </links>
4780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4781             <actions>
4782                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4783                 <retrieve/>
4784                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4785                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4786             </actions>
4787         </permacrud>
4788         </class>
4789         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4790                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4791                         <field name="create_date" reporter:datatype="timestamp"/>
4792                         <field name="creator" reporter:datatype="link"/>
4793                         <field name="edit_date" reporter:datatype="timestamp"/>
4794                         <field name="editor" reporter:datatype="link"/>
4795                         <field name="id" reporter:datatype="id" />
4796                         <field name="pub" reporter:datatype="bool"/>
4797                         <field name="record" reporter:datatype="link"/>
4798                         <field name="value"  reporter:datatype="text"/>
4799                 </fields>
4800                 <links>
4801                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4802                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4803                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4804                 </links>
4805         </class>
4806         <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">
4807                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4808                         <field name="balance_owed" reporter:datatype="money" />
4809                         <field name="total_owed" reporter:datatype="money" />
4810                         <field name="total_paid" reporter:datatype="money" />
4811                         <field name="usr" reporter:datatype="link"/>
4812                 </fields>
4813                 <links>
4814                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4815                 </links>
4816         </class>
4817         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4819                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4820                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4821                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4822                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4823                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4824                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4825                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4826                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4827                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4828                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4829                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4830                 </fields>
4831                 <links>
4832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4833                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4834                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4835                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4836                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4837                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4838                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4839                 </links>
4840         </class>
4841         <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">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4843                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4844                         <field name="quality" reporter:datatype="int" />
4845                         <field name="source" reporter:datatype="text"/>
4846                         <field name="transcendant" reporter:datatype="bool"/>
4847                 </fields>
4848                 <links/>
4849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4850             <actions>
4851                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4852                 <retrieve/>
4853                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4854                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4855             </actions>
4856         </permacrud>
4857         </class>
4858         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4859                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4860                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4861                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4862                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4863                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4864                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4865                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4866                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4869                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4870                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4871                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4872                 </fields>
4873                 <links>
4874                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4875                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4876                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4877                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4878                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4879                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4880                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4881                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4882                 </links>
4883         </class>
4884         <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">
4885                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
4886                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
4887                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4888                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4889                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4890                 </fields>
4891                 <links>
4892                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
4893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4894                 </links>
4895         </class>
4896         <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">
4897                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
4898                         <field name="bucket" reporter:datatype="link"/>
4899                         <field name="id" reporter:datatype="id" />
4900                         <field name="target_user" reporter:datatype="link"/>
4901                         <field name="create_time" reporter:datatype="timestamp" />
4902                         <field name="pos" reporter:datatype="int" />
4903                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4904                 </fields>
4905                 <links>
4906                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
4907                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4908             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
4909                 </links>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
4913                         <field name="id" reporter:datatype="id" />
4914                         <field name="item" reporter:datatype="link"/>
4915                         <field name="note" reporter:datatype="text" />
4916                 </fields>
4917                 <links>
4918                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
4919                 </links>
4920         </class>
4921         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
4922                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4923                         <field name="balance_owed" reporter:datatype="money" />
4924                         <field name="total_owed" reporter:datatype="money" />
4925                         <field name="total_paid" reporter:datatype="money" />
4926                         <field name="usr" reporter:datatype="link"/>
4927                 </fields>
4928                 <links>
4929                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4930                 </links>
4931         </class>
4932         <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">
4933                 <fields oils_persist:primary="code" oils_persist:sequence="">
4934                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
4935                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4936                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4937                 </fields>
4938                 <links/>
4939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4940             <actions>
4941                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4942                 <retrieve/>
4943                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4944                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4945             </actions>
4946         </permacrud>
4947         </class>
4948         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
4949                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4950                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4951                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4952                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4953                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4954                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4955                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4956                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4957                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4958                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4959                 </fields>
4960                 <links>
4961                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4962                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4963                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4964                 </links>
4965         </class>
4966         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
4967                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4968                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4969                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4970                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4971                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4972                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4973                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4974                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
4975                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
4977                 </fields>
4978                 <links>
4979                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4980                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4981                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4982                 </links>
4983         </class>
4984         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
4985                 <fields oils_persist:primary="id" oils_persist:sequence="">
4986                         <field name="checkin_lib" reporter:datatype="link"/>
4987                         <field name="checkin_staff" reporter:datatype="link"/>
4988                         <field name="checkin_time" reporter:datatype="timestamp"/>
4989                         <field name="circ_lib"  reporter:datatype="org_unit"/>
4990                         <field name="circ_staff" reporter:datatype="link"/>
4991                         <field name="desk_renewal" reporter:datatype="bool"/>
4992                         <field name="due_date" reporter:datatype="timestamp"/>
4993                         <field name="duration" reporter:datatype="interval"/>
4994                         <field name="duration_rule" reporter:datatype="link"/>
4995                         <field name="fine_interval" reporter:datatype="interval"/>
4996                         <field name="id" reporter:datatype="id" />
4997                         <field name="max_fine" reporter:datatype="money" />
4998                         <field name="max_fine_rule" reporter:datatype="link"/>
4999                         <field name="opac_renewal" reporter:datatype="bool"/>
5000                         <field name="phone_renewal" reporter:datatype="bool"/>
5001                         <field name="recurring_fine" reporter:datatype="money" />
5002                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5003                         <field name="renewal_remaining" reporter:datatype="int" />
5004             <field name="grace_period" reporter:datatype="interval" />
5005                         <field name="stop_fines" reporter:datatype="text"/>
5006                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5007                         <field name="target_copy" reporter:datatype="link"/>
5008                         <field name="usr" reporter:datatype="link"/>
5009                         <field name="xact_finish" reporter:datatype="timestamp" />
5010                         <field name="xact_start" reporter:datatype="timestamp" />
5011                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5012                 </fields>
5013                 <links>
5014                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5015                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5016                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5017                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5018                 </links>
5019         </class>
5020         <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">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5022                         <field name="field" reporter:datatype="link"/>
5023                         <field name="id" reporter:datatype="id" />
5024                         <field name="source" reporter:datatype="link"/>
5025                         <field name="value" reporter:datatype="text"/>
5026                 </fields>
5027                 <links>
5028                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5029                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5030                 </links>
5031         </class>
5032         <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">
5033                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5034                         <field name="high" reporter:datatype="money" />
5035                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5036                         <field name="low" reporter:datatype="money" />
5037                         <field name="name" reporter:datatype="text"/>
5038                         <field name="normal" reporter:datatype="money" />
5039                         <field name="recurrence_interval" reporter:datatype="interval"/>
5040             <field name="grace_period" reporter:datatype="interval" />
5041                 </fields>
5042                 <links/>
5043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5044             <actions>
5045                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5046                 <retrieve/>
5047                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5048                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5049             </actions>
5050         </permacrud>
5051         </class>
5052         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5053                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5054                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5055                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5056                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5057                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5058                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5059                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5060                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5061                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5062                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5063                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5064                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5065                 </fields>
5066                 <links>
5067                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5068                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5069                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5070                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5071                 </links>
5072         </class>
5073         <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">
5074                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5075                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5076                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5077                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5078                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5079                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5080                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5081                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5082                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5083                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5084                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5086                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5087                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5088                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5089                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5090                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5091                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5092                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5093                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5095                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5096                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5097                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5098                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5099                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5100                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5101                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5102                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5103                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5104                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5105                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5106                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5107                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5108                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5109                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5110                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5111                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5112                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5113                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5114                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5115                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5116                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5117                 </fields>
5118                 <links>
5119                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5120                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5121                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5122                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5123                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5124                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5125                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5126                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5127                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5128                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5129                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5130                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5131                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5132                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5133                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5134                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5135                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5136                 </links>
5137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5138             <actions>
5139                 <create permission="CREATE_COPY">
5140                     <context link="call_number" field="owning_lib"/>
5141                 </create>
5142                 <retrieve/>
5143                 <update permission="UPDATE_COPY">
5144                     <context link="call_number" field="owning_lib"/>
5145                 </update>
5146                 <delete permission="DELETE_COPY">
5147                     <context link="call_number" field="owning_lib"/>
5148                 </delete>
5149             </actions>
5150         </permacrud>
5151         </class>
5152
5153         <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">
5154                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5155                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5156                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5157                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5158                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5159                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5161                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5162                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5163                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
5164                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5165                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5166                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5167                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5168                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5169                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5170                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5171                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5172                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5173                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5174                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5175                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5176                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5177                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5178                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5179                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5180                 </fields>
5181                 <links>
5182                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5183                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5184                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5187                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5188                 </links>
5189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5190                         <actions>
5191                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5192                                 <retrieve />
5193                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5194                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5195                         </actions>
5196                 </permacrud>
5197         </class>
5198
5199         <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">
5200                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5201                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5202                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5203                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5204                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5205                 </fields>
5206                 <links/>
5207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5208             <actions>
5209                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5210                 <retrieve/>
5211                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5212                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5213             </actions>
5214         </permacrud>
5215         </class>
5216         <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">
5217                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5218                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5219                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5220                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5221                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5222                 </fields>
5223                 <links/>
5224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5225             <actions>
5226                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5227                 <retrieve/>
5228                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5229                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5230             </actions>
5231         </permacrud>
5232         </class>
5233         <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">
5234                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5235                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5236                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5237                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5238                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5239                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5240                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5241                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5242                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5243                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5244                 </fields>
5245                 <links>
5246                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5247                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5248                 </links>
5249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5250             <actions>
5251                 <create permission="CREATE_PERM" global_required="true"/>
5252                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5253                 <update permission="UPDATE_PERM" global_required="true"/>
5254                 <delete permission="DELETE_PERM" global_required="true"/>
5255             </actions>
5256         </permacrud>
5257         </class>
5258         <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">
5259                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5260                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5261                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5262                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5263                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5264                 </fields>
5265                 <links>
5266                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5267                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5268                 </links>
5269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270             <actions>
5271                 <create permission="ADMIN_SURVEY">
5272                     <context link="question" jump="survey" field="owner"/>
5273                 </create>
5274                 <retrieve/>
5275                 <update permission="ADMIN_SURVEY">
5276                     <context link="question" jump="survey" field="owner"/>
5277                 </update>
5278                 <delete permission="ADMIN_SURVEY">
5279                     <context link="question" jump="survey" field="owner"/>
5280                 </delete>
5281             </actions>
5282         </permacrud>
5283         </class>
5284         <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">
5285                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5286                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5287                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5288                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5289                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5290                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5291                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5292                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5293                 </fields>
5294                 <links>
5295                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5296                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5297                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5298                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5299                 </links>
5300         </class>
5301         <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">
5302                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5303                         <field name="balance_owed" reporter:datatype="money" />
5304                         <field name="total_owed" reporter:datatype="money" />
5305                         <field name="total_paid" reporter:datatype="money" />
5306                         <field name="usr" reporter:datatype="link"/>
5307                 </fields>
5308                 <links>
5309                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5310                 </links>
5311         </class>
5312         <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">
5313                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5314                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5315                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5316                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5317                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5318                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5319                 </fields>
5320                 <links>
5321                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5322                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5323                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5324                 </links>
5325         </class>
5326         <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">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5328                         <field name="field" reporter:datatype="link"/>
5329                         <field name="id" reporter:datatype="id" />
5330                         <field name="source" reporter:datatype="link"/>
5331                         <field name="value" reporter:datatype="text"/>
5332                 </fields>
5333                 <links>
5334                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5335                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5336                 </links>
5337         </class>
5338         <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">
5339                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5340                         <field name="field" reporter:datatype="link"/>
5341                         <field name="id" reporter:datatype="id" />
5342                         <field name="source" reporter:datatype="link"/>
5343                         <field name="value" reporter:datatype="text"/>
5344                 </fields>
5345                 <links>
5346                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5347                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5348                 </links>
5349         </class>
5350         <class id="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">
5351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5352                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5353                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5354                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5355                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5356                 </fields>
5357                 <links>
5358                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5359                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5360                 </links>
5361         </class>
5362         <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">
5363                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5364                         <field name="depth" reporter:datatype="int" />
5365                         <field name="grantable" reporter:datatype="bool"/>
5366                         <field name="grp" reporter:datatype="link"/>
5367                         <field name="id" reporter:datatype="id" />
5368                         <field name="perm" reporter:datatype="link"/>
5369                 </fields>
5370                 <links>
5371                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5372                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5373                 </links>
5374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5375             <actions>
5376                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5377                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5378                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5379                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5380             </actions>
5381         </permacrud>
5382         </class>
5383         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5385                         <field name="items" oils_persist:virtual="true" />
5386                         <field name="btype" reporter:datatype="text"/>
5387                         <field name="id" reporter:datatype="id" />
5388                         <field name="name" reporter:datatype="text"/>
5389                         <field name="owner" reporter:datatype="link"/>
5390                         <field name="pub" reporter:datatype="bool"/>
5391                         <field name="create_time" reporter:datatype="timestamp" />
5392                 </fields>
5393                 <links>
5394                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5395                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5396                 </links>
5397         </class>
5398         <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">
5399                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5400                         <field name="id" reporter:datatype="id" />
5401                         <field name="bucket" reporter:datatype="link"/>
5402                         <field name="note" reporter:datatype="text" />
5403                 </fields>
5404                 <links>
5405                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5406                 </links>
5407         </class>
5408         <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">
5409                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5410                         <field name="id" reporter:datatype="int" />
5411                         <field name="usr" reporter:datatype="link"/>
5412                         <field name="work_ou" reporter:datatype="link"/>
5413                 </fields>
5414                 <links>
5415                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5416                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5417                 </links>
5418         </class>
5419         <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">
5420                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5421                         <field name="depth" reporter:datatype="int"/>
5422                         <field name="grantable" reporter:datatype="bool"/>
5423                         <field name="id" reporter:datatype="id" />
5424                         <field name="perm" reporter:datatype="link"/>
5425                         <field name="usr" reporter:datatype="link"/>
5426                 </fields>
5427                 <links>
5428                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5429                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5430                 </links>
5431         </class>
5432         <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">
5433                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5434                         <field name="object_id" reporter:datatype="text"/>
5435                         <field name="grantable" reporter:datatype="bool"/>
5436                         <field name="id" reporter:datatype="id" />
5437                         <field name="perm" reporter:datatype="link"/>
5438                         <field name="usr" reporter:datatype="link"/>
5439                         <field name="object_type" reporter:datatype="text"/>
5440                 </fields>
5441                 <links>
5442                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5443                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5444                 </links>
5445         </class>
5446         <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">
5447                 <fields oils_persist:primary="id" oils_persist:sequence="">
5448                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5449                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5450                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5451                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5453                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5454                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5455                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5459                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5460                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5461                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5462                 </fields>
5463                 <links>
5464                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5465                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5466                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5467                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5468                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5469                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5470                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5471                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5472                 </links>
5473         </class>
5474         <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">
5475                 <fields oils_persist:primary="id" oils_persist:sequence="">
5476                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5477                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5478                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5479                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5480                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5481                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5482                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5483                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5484                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5485                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5486                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5487                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5488                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5489                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5490                 </fields>
5491                 <links>
5492                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5493                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5494                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5495                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5496                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5497                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5498                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5499                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5500                 </links>
5501         </class>
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="">
5504                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5505                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5506                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5507                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5508                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5509                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5510                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5511                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5512                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5513                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5514                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5515                 </fields>
5516                 <links>
5517                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5518                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5519                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5520                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5521                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5522                 </links>
5523         </class>
5524         <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">
5525                 <fields oils_persist:primary="id" oils_persist:sequence="">
5526                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5527                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5528                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5529                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5530                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5531                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5532                         <field reporter:label="Accepting User" name="accepting_usr" />
5533                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5534                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5535                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5537                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5538                 </fields>
5539                 <links>
5540                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5541                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5542                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5543                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5544                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5545                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5546                 </links>
5547         </class>
5548         <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">
5549                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5550                         <field name="bucket" reporter:datatype="link"/>
5551                         <field name="id" reporter:datatype="id" />
5552                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5553                         <field name="create_time" reporter:datatype="timestamp" />
5554                         <field name="pos" reporter:datatype="int" />
5555                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5556                 </fields>
5557                 <links>
5558                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5559                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5560             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5561                 </links>
5562         </class>
5563         <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">
5564                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5565                         <field name="id" reporter:datatype="id" />
5566                         <field name="item" reporter:datatype="link"/>
5567                         <field name="note" reporter:datatype="text" />
5568                 </fields>
5569                 <links>
5570                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5571                 </links>
5572         </class>
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5575                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5576                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5577                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5578                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5579                 </fields>
5580                 <links>
5581                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5582                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5583                 </links>
5584         </class>
5585     <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">
5586         <fields oils_persist:primary="field">
5587             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5588             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5589             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5590         </fields>
5591         <links/>
5592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5593             <actions>
5594                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5595                 <retrieve />
5596                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5597                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5598             </actions>
5599         </permacrud>
5600     </class>
5601         <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">
5602                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5603                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5604                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5605                 </fields>
5606                 <links/>
5607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5608             <actions>
5609                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5610                 <retrieve/>
5611                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5612                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5613             </actions>
5614         </permacrud>
5615         </class>
5616
5617
5618         <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">
5619                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5620                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5621                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5622                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5623                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5624                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5625                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5626                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5627                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5628                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5629                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5630                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5631                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5632                 </fields>
5633                 <links>
5634                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5635                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5636                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5637                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5638                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5639                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5640                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5641                 </links>
5642         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5643             <actions>
5644                 <create permission="TRANSIT_COPY">
5645                     <context link="target_copy" field="owner"/>
5646                 </create>
5647                 <retrieve/>
5648                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5649                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5650             </actions>
5651         </permacrud>
5652         </class>
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5655                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5656                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5657                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5658                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5659                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5660                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5661                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5662                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5663                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5665                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5666                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5667                 </fields>
5668                 <links>
5669                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5670                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5671                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5672                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5673                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5674                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5675                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5676                 </links>
5677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5678             <actions>
5679                 <create permission="TRANSIT_COPY" context_field="owner">
5680                     <context link="target_copy" field="circ_lib"/>
5681                 </create>
5682                 <retrieve/>
5683                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5684                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5685             </actions>
5686         </permacrud>
5687         </class>
5688         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5689                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5690                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5691                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5692                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5693                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5694                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5695                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5696                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5697                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5698                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5699                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5700                 </fields>
5701                 <links>
5702                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5703                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5704                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5705                 </links>
5706         </class>
5707         <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">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5709                         <field name="grp" />
5710                         <field name="id" reporter:datatype="id" />
5711                         <field name="usr" />
5712                 </fields>
5713                 <links>
5714                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5715                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5716                 </links>
5717         </class>
5718         <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">
5719                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5720                         <field name="id" reporter:datatype="id" />
5721                         <field name="fq_field" reporter:datatype="text"/>
5722                         <field name="identity_value" reporter:datatype="text"/>
5723                         <field name="translation" reporter:datatype="text"/>
5724                         <field name="string" reporter:datatype="text"/>
5725                 </fields>
5726                 <links>
5727                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5728                 </links>
5729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5730             <actions>
5731                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5732                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5733                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5734                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5735             </actions>
5736         </permacrud>
5737         </class>
5738         <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">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5740                         <field name="id" reporter:datatype="id" />
5741                         <field name="fm_class" reporter:datatype="text"/>
5742                         <field name="field" reporter:datatype="text"/>
5743                         <field name="owner" reporter:datatype="org_unit"/>
5744                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5745                 </fields>
5746                 <links>
5747                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5748                 </links>
5749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5750             <actions>
5751                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5752                 <retrieve/>
5753                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5754                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5755             </actions>
5756         </permacrud>
5757         </class>
5758         <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">
5759                 <fields oils_persist:primary="code">
5760                         <field name="code" reporter:datatype="id" />
5761                         <field name="marc_code" reporter:datatype="text"/>
5762                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5763                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5764                 </fields>
5765                 <links/>
5766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5767             <actions>
5768                 <create permission="CREATE_LOCALE" global_required="true"/>
5769                 <retrieve/>
5770                 <update permission="UPDATE_LOCALE" global_required="true"/>
5771                 <delete permission="DELETE_LOCALE" global_required="true"/>
5772             </actions>
5773         </permacrud>
5774         </class>
5775         <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">
5776                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5777                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5778                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5779                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5780             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5781                 </fields>
5782                 <links>
5783                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5784                 </links>
5785         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5786             <actions>
5787                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5788                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5789                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5790                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5791             </actions>
5792         </permacrud>
5793         </class>
5794
5795         <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">
5796                 <fields oils_persist:primary="id">
5797                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5798                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5799                 </fields>
5800                 <links/>
5801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5802             <actions>
5803                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5804                 <retrieve/>
5805                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5806                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5807             </actions>
5808         </permacrud>
5809         </class>
5810
5811         <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">
5812                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5813                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5814                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5815                         <field reporter:label="Request Type" name="request_type" reporter:datatype="link" />
5816                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5817                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5818                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5819                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5820                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5821                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5822                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5823                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5824                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5825                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5826                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5827                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5828                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5829                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5830                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5831                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5832                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5833                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5834                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5835                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5836                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5837                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5838                 </fields>
5839                 <links>
5840                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5841                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5842                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5843                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5844                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5845                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5846                 </links>
5847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5848             <actions>
5849                 <create permission="user_request.create">
5850                     <context link="usr" field="home_ou"/>
5851                                 </create>
5852                 <retrieve permission="user_request.view">
5853                     <context link="usr" field="home_ou"/>
5854                                 </retrieve>
5855                 <update permission="user_request.update">
5856                     <context link="usr" field="home_ou"/>
5857                                 </update>
5858                 <delete permission="user_request.delete">
5859                     <context link="usr" field="home_ou"/>
5860                                 </delete>
5861             </actions>
5862         </permacrud>
5863         </class>
5864
5865         <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">
5866                 <fields oils_persist:primary="code">
5867                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5868                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5869                 </fields>
5870                 <links/>
5871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5872             <actions>
5873                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5874                 <retrieve/>
5875                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5876                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5877             </actions>
5878         </permacrud>
5879         </class>
5880
5881         <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">
5882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
5883                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
5884                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
5885                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
5886                         <field reporter:label="Ratio" name="ratio" />
5887                 </fields>
5888                 <links>
5889                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
5890                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
5891                 </links>
5892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5893                         <actions>
5894                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5895                                 <retrieve/>
5896                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5897                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5898                         </actions>
5899                 </permacrud>
5900         </class>
5901
5902         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
5903                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
5904                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
5905                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
5906                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
5907                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
5908                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5909                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
5910                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
5911                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
5912                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
5913                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
5914                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
5915                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5916                         <field reporter:label="Email" name="email" reporter:datatype="text" />
5917                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
5918                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
5919                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
5920                 </fields>
5921                 <links>
5922                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
5923                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5924             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
5925             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
5926             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
5927                 </links>
5928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5929             <actions>
5930                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
5931                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
5932                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
5933                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
5934             </actions>
5935         </permacrud>
5936         </class>
5937
5938         <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">
5939                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
5940                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
5941                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5942                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
5943                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
5944                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
5945                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
5946                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
5947                 </fields>
5948                 <links>
5949                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5950                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5951                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5952                 </links>
5953         </class>
5954
5955         <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">
5956                 <fields oils_persist:primary="code">
5957                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
5958                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5959                 </fields>
5960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961             <actions>
5962                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5963                 <retrieve/>
5964                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5965                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
5966             </actions>
5967                 </permacrud>
5968         </class>
5969
5970         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
5972                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
5973                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
5974                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
5975                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
5976                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
5977                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
5978                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
5979                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
5980                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
5981                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
5982                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5983                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
5984                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
5985                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
5986                 </fields>
5987                 <links>
5988                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
5989                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5990                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
5991                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
5992                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
5993                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
5994                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
5995                 </links>
5996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5997             <actions>
5998                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
5999                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6000                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6001                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6002             </actions>
6003         </permacrud>
6004         </class>
6005
6006         <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">
6007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6009                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6010                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6011                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6012                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6013                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6014                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6015                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6016                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6017                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6018                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6019                 </fields>
6020                 <links>
6021                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6022                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6023                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6024                 </links>
6025         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6026             <actions>
6027                 <create   permission="ADMIN_INVOICE">
6028                                         <context link="invoice" field="receiver"/>
6029                                 </create>
6030                 <retrieve permission="ADMIN_INVOICE">
6031                                         <context link="invoice" field="receiver"/>
6032                                 </retrieve>
6033                 <update   permission="ADMIN_INVOICE">
6034                                         <context link="invoice" field="receiver"/>
6035                                 </update>
6036                                 <delete   permission="ADMIN_INVOICE">
6037                                         <context link="invoice" field="receiver"/>
6038                                 </delete>
6039             </actions>
6040         </permacrud>
6041         </class>
6042
6043         <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">
6044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6046                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6047                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6048                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6049                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6050                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6051                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6052                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6053                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6054                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6055                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6056                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6057                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6058                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6059                 </fields>
6060                 <links>
6061                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6062                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6063                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6064                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6065                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6066                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6067                 </links>
6068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6069             <actions>
6070                 <create   permission="ADMIN_INVOICE">
6071                                         <context link="invoice" field="receiver"/>
6072                                 </create>
6073                 <retrieve permission="ADMIN_INVOICE">
6074                                         <context link="invoice" field="receiver"/>
6075                                 </retrieve>
6076                 <update   permission="ADMIN_INVOICE">
6077                                         <context link="invoice" field="receiver"/>
6078                                 </update>
6079                                 <delete   permission="ADMIN_INVOICE">
6080                                         <context link="invoice" field="receiver"/>
6081                                 </delete>
6082             </actions>
6083         </permacrud>
6084         </class>
6085
6086         <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">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6088                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6089                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6090                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6091                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6093                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6094                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6095                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6096                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6097                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6098                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6099                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6100                 </fields>
6101                 <links>
6102                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6103                 </links>
6104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6105             <actions>
6106                 <create permission="ADMIN_PROVIDER">
6107                     <context link="provider" field="owner"/>
6108                 </create>
6109                 <retrieve permission="ADMIN_PROVIDER">
6110                     <context link="provider" field="owner"/>
6111                 </retrieve>
6112                 <update permission="ADMIN_PROVIDER">
6113                     <context link="provider" field="owner"/>
6114                 </update>
6115                 <delete permission="ADMIN_PROVIDER">
6116                     <context link="provider" field="owner"/>
6117                 </delete>
6118             </actions>
6119         </permacrud>
6120         </class>
6121
6122         <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">
6123                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6125                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6126                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6127                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6128                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6129                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6130         </fields>
6131                 <links>
6132                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6133                 </links>
6134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6135             <actions>
6136                 <create permission="ADMIN_PROVIDER">
6137                     <context link="provider" field="owner"/>
6138                 </create>
6139                 <retrieve permission="ADMIN_PROVIDER">
6140                     <context link="provider" field="owner"/>
6141                 </retrieve>
6142                 <update permission="ADMIN_PROVIDER">
6143                     <context link="provider" field="owner"/>
6144                 </update>
6145                 <delete permission="ADMIN_PROVIDER">
6146                     <context link="provider" field="owner"/>
6147                 </delete>
6148             </actions>
6149         </permacrud>
6150     </class>
6151         <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">
6152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6153                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6154                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6155                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6156                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6157                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6158                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6159                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6160                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6161                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6162                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6163                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6164                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6165                 </fields>
6166                 <links>
6167                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6168                 </links>
6169         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6170             <actions>
6171                 <create permission="ADMIN_PROVIDER">
6172                     <context link="contact" jump='provider' field="owner"/>
6173                 </create>
6174                 <retrieve permission="ADMIN_PROVIDER">
6175                     <context link="contact" jump='provider' field="owner"/>
6176                 </retrieve>
6177                 <update permission="ADMIN_PROVIDER">
6178                     <context link="contact" jump='provider' field="owner"/>
6179                 </update>
6180                 <delete permission="ADMIN_PROVIDER">
6181                     <context link="contact" jump='provider' field="owner"/>
6182                 </delete>
6183             </actions>
6184         </permacrud>
6185         </class>
6186
6187         <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">
6188                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6189                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6190                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6191                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6192                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6193                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6194                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6195                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6196                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6197                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6198                 </fields>
6199                 <links>
6200                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6201                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6202                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6203                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6204                 </links>
6205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6206                 </permacrud>
6207         </class>
6208
6209         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6211                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6212                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6213                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6214                 </fields>
6215                 <links>
6216             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6217                 </links>
6218                 <!--
6219                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6220                         But here's what it should look like if we ever do use pcrud.
6221                 -->
6222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6223                         <actions>
6224                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6225                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6226                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6227                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6228                         </actions>
6229                 </permacrud>
6230         </class>
6231
6232         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6234                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6235                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6236                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6237                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6238                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6239                 </fields>
6240                 <links>
6241                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6242                 </links>
6243                 <!--
6244                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6245                         But here's what it should look like if we ever do use pcrud.
6246                 -->
6247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6248                         <actions>
6249                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6250                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6251                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6252                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6253                         </actions>
6254                 </permacrud>
6255         </class>
6256
6257         <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">
6258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6259                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6260                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6261                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6262                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6263                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6264                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6265                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6266                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6267                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6268                 </fields>
6269                 <links>
6270                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6271                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6272             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6273             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6274                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6275                 </links>
6276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6277             <actions>
6278                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6279                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6280                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6281                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6282             </actions>
6283         </permacrud>
6284         </class>
6285
6286         <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">
6287                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6288                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6289                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6290                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6291                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6292                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6293                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6294                 </fields>
6295                 <links>
6296                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6297                 </links>
6298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6299                         <actions>
6300                                 <create permission="ADMIN_FUNDING_SOURCE">
6301                     <context link="funding_source" field="owner"/>
6302                 </create>
6303                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6304                     <context link="funding_source" field="owner"/>
6305                 </retrieve>
6306                                 <update permission="ADMIN_FUNDING_SOURCE">
6307                     <context link="funding_source" field="owner"/>
6308                 </update>
6309                                 <delete permission="ADMIN_FUNDING_SOURCE">
6310                     <context link="funding_source" field="owner"/>
6311                 </delete>
6312                         </actions>
6313                 </permacrud>
6314         </class>
6315
6316         <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">
6317                 <fields oils_persist:primary="id">
6318                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6319                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6320                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6321                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6322                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6323                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6324                 </fields>
6325                 <links>
6326                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6327                 </links>
6328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6329                 </permacrud>
6330         </class>
6331
6332         <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">
6333                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6334                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6335                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6336                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6337                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6338                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6339                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6340                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6341                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6342                 </fields>
6343                 <links>
6344                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6345                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6346                 </links>
6347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6348                         <actions>
6349                                 <create permission="ADMIN_ACQ_FUND">
6350                     <context link="fund" field="org"/>
6351                 </create>
6352                                 <retrieve permission="ADMIN_ACQ_FUND">
6353                     <context link="fund" field="org"/>
6354                 </retrieve>
6355                                 <update permission="ADMIN_ACQ_FUND">
6356                     <context link="fund" field="org"/>
6357                 </update>
6358                                 <delete permission="ADMIN_ACQ_FUND">
6359                     <context link="fund" field="org"/>
6360                 </delete>
6361                         </actions>
6362                 </permacrud>
6363         </class>
6364
6365         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6367                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6368                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6369                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6370                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6371                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6372                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6373                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6374                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6375                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6376                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6377                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6378                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6379                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6380                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6381                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6382                 </fields>
6383                 <links>
6384                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6385                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6386             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6387             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6388             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6389                 </links>
6390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6391             <actions>
6392                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6393                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6394                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6395                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6396             </actions>
6397         </permacrud>
6398         </class>
6399
6400         <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">
6401                 <fields oils_persist:primary="fund">
6402                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6403                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6404                 </fields>
6405                 <links>
6406                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6407                 </links>
6408         </class>
6409
6410         <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">
6411                 <fields oils_persist:primary="fund">
6412                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6413                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6414                 </fields>
6415                 <links>
6416                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6417                 </links>
6418         </class>
6419
6420         <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">
6421                 <fields oils_persist:primary="fund">
6422                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6423                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6424                 </fields>
6425                 <links>
6426                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6427                 </links>
6428         </class>
6429
6430         <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">
6431                 <fields oils_persist:primary="fund">
6432                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6433                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6434                 </fields>
6435                 <links>
6436                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6437                 </links>
6438         </class>
6439
6440         <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">
6441                 <fields oils_persist:primary="fund">
6442                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6443                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6444                 </fields>
6445                 <links>
6446                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6447                 </links>
6448         </class>
6449
6450    <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">
6451         <fields oils_persist:primary="fund">
6452             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6453             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6454         </fields>
6455         <links>
6456             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6457         </links>
6458     </class>
6459
6460    <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">
6461         <fields oils_persist:primary="fund">
6462             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6463             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6464         </fields>
6465         <links>
6466             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6467         </links>
6468     </class>
6469
6470    <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">
6471         <fields oils_persist:primary="fund">
6472             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6473             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6474         </fields>
6475         <links>
6476             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6477         </links>
6478     </class>
6479
6480    <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">
6481         <fields oils_persist:primary="fund">
6482             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6483             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6484         </fields>
6485         <links>
6486             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6487         </links>
6488     </class>
6489
6490    <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">
6491         <fields oils_persist:primary="fund">
6492             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6493             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6494         </fields>
6495         <links>
6496             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6497         </links>
6498     </class>
6499
6500         <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">
6501                 <fields oils_persist:primary="funding_source">
6502                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6503                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6504                 </fields>
6505                 <links>
6506                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6507                 </links>
6508         </class>
6509
6510         <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">
6511                 <fields oils_persist:primary="funding_source">
6512                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6513                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6514                 </fields>
6515                 <links>
6516                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6517                 </links>
6518         </class>
6519
6520         <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">
6521                 <fields oils_persist:primary="funding_source">
6522                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6523                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6524                 </fields>
6525                 <links>
6526                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6527                 </links>
6528         </class>
6529
6530         <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">
6531                 <fields oils_persist:primary="fund">
6532                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6533                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6534                 </fields>
6535                 <links>
6536                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6537                 </links>
6538         </class>
6539
6540         <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">
6541                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6542                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6543                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6544                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6545                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6546                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6547                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6548                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6549                 </fields>
6550                 <links>
6551                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6552                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6553                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6554                 </links>
6555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556                         <actions>
6557                                 <create permission="ADMIN_ACQ_FUND">
6558                     <context link="fund" field="org"/>
6559                 </create>
6560                                 <retrieve permission="ADMIN_ACQ_FUND">
6561                     <context link="fund" field="org"/>
6562                 </retrieve>
6563                                 <update permission="ADMIN_ACQ_FUND">
6564                     <context link="fund" field="org"/>
6565                 </update>
6566                                 <delete permission="ADMIN_ACQ_FUND">
6567                     <context link="fund" field="org"/>
6568                 </delete>
6569                         </actions>
6570                 </permacrud>
6571         </class>
6572
6573     <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">
6574         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6575             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6576             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6577             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6578             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6579             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6580             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6581             <field reporter:label="Note" name="note" reporter:datatype="text" />
6582             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6583         </fields>
6584         <links>
6585             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6586             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6587             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6588         </links>
6589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590                         <actions>
6591                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6592                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6593                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6594                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6595                         </actions>
6596                 </permacrud>
6597     </class>
6598
6599         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6601                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6602                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6603                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6604                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6605                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6606                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6607                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6608                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6609                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6610                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6611                 </fields>
6612                 <links>
6613                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6614                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6615                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6616                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6617                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6618                 </links>
6619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6620                         <actions>
6621                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6622                         </actions>
6623                 </permacrud>
6624         </class>
6625
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6628                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6629                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6630                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6631                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6632                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6633                 </fields>
6634                 <links>
6635                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6636                 </links>
6637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6638                         <actions>
6639                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6640                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6641                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6642                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6643                         </actions>
6644                 </permacrud>
6645         </class>
6646
6647         <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">
6648                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6649                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6650                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6651                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6652                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6653                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6654                         <field reporter:label="State" name="state" reporter:datatype="text" />
6655                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6656                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6657                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6658                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6659                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6660                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6661                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6662                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6663                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6664                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6665                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6666                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6667                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6668                 </fields>
6669                 <links>
6670                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6671                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6672                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6673                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6674                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6675                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6676                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6677                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6678                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6679                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6680                 </links>
6681                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6682                         <actions>
6683                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6684                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6685                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6686                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6687                         </actions>
6688                 </permacrud>
6689         </class>
6690
6691         <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">
6692                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6693                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6694                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6695                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6696                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6697                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6698                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6699                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6700                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6701                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6702                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6703                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6704                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6705                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6706                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6707                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6708                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6709                 </fields>
6710                 <links>
6711                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6712                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6713                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6714                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6715                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6716                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6717                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6718                 </links>
6719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6720             <actions>
6721                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6722             </actions>
6723                 </permacrud>
6724         </class>
6725
6726         <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">
6727                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6728                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6729                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6730                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6731                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6732                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6733                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6734                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6735                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6736                 </fields>
6737                 <links>
6738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6739                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6740                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6741                 </links>
6742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743             <actions>
6744                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6745                     <context link="purchase_order" field="ordering_agency"/>
6746                 </retrieve>
6747                 <create permission="CREATE_PURCHASE_ORDER">
6748                     <context link="purchase_order" field="ordering_agency"/>
6749                 </create>
6750                 <update permission="CREATE_PURCHASE_ORDER">
6751                     <context link="purchase_order" field="ordering_agency"/>
6752                 </update>
6753                 <delete permission="CREATE_PURCHASE_ORDER">
6754                     <context link="purchase_order" field="ordering_agency"/>
6755                 </delete>
6756             </actions>
6757                 </permacrud>
6758         </class>
6759
6760         <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">
6761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6763                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6764                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6765                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6766                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6767                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6768                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6769                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6770                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6771                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6772                 </fields>
6773                 <links>
6774                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6775                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6776                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6777                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6778                 </links>
6779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6780             <actions>
6781                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6782                     <context link="purchase_order" field="ordering_agency"/>
6783                 </retrieve>
6784                 <create permission="CREATE_PURCHASE_ORDER">
6785                     <context link="purchase_order" field="ordering_agency"/>
6786                 </create>
6787                 <update permission="CREATE_PURCHASE_ORDER">
6788                     <context link="purchase_order" field="ordering_agency"/>
6789                 </update>
6790                 <delete permission="CREATE_PURCHASE_ORDER">
6791                     <context link="purchase_order" field="ordering_agency"/>
6792                 </delete>
6793             </actions>
6794                 </permacrud>
6795         </class>
6796
6797         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6799                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6800                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6801                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6802                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6803                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6804                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6805                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6806                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6807                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6808                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6809                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6810                         <field reporter:label="State" name="state" reporter:datatype="text" />
6811                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6812                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6813                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6814                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6815                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6816                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6817                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6818                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6819                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6820                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6821                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6822                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6823                 </fields>
6824                 <links>
6825                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6826                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6827                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6828                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6829                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6830                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6831                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6832                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6833                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6834                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6835                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6836                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6837                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6838                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6839                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6840                 </links>
6841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6842                         <actions>
6843                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6844                                         <context link="purchase_order" field="ordering_agency"/>
6845                                         <context link="picklist" field="org_unit"/>
6846                                 </retrieve>
6847                         </actions>
6848                 </permacrud>
6849         </class>
6850
6851         <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">
6852                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6853                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6854                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6855                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6856                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6857                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6858                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6859                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6860                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6861                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6862                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6863                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6864                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6865                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6866                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6867                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6868                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6869                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6870                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6871                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6872                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6873                 </fields>
6874                 <links>
6875                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6876                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6877                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6878                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6879                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6880                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6881                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6882                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6883                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6884                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6885                 </links>
6886                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6887                         <actions>
6888                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6889                                         <context link="purchase_order" field="ordering_agency"/>
6890                                         <context link="picklist" field="org_unit"/>
6891                                 </retrieve>
6892                         </actions>
6893                 </permacrud>
6894         </class>
6895
6896         <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">
6897                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
6898                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
6899                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
6900                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6901                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
6902                 </fields>
6903                 <links>
6904                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6905                 </links>
6906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6907                         <actions>
6908                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6909                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
6910                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6911                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
6912                         </actions>
6913                 </permacrud>
6914         </class>
6915
6916         <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">
6917                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
6918                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
6919                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
6920                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6921                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6922                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6923                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6924                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6925                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
6926                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6927                 </fields>
6928                 <links>
6929                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6930                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6931                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6932                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
6933                 </links>
6934         </class>
6935
6936         <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">
6937                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
6938                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
6939                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
6940                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
6941                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
6942                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
6943                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
6944                 </fields>
6945                 <links>
6946                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6947                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
6948                 </links>
6949         </class>
6950
6951         <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">
6952                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
6953                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
6954                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6955                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
6956                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
6957                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
6958                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
6959                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6960                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
6961                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
6962                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
6963                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
6964                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6965                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
6966                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6967                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
6968                 </fields>
6969                 <links>
6970                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6971                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
6972                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6973                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6974                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6975                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6976                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6977                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6978                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
6979                 </links>
6980         </class>
6981
6982         <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">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6984                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
6985                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6986                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
6987                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
6988                 </fields>
6989                 <links/>
6990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991                         <actions>
6992                                 <retrieve />
6993                         </actions>
6994                 </permacrud>
6995         </class>
6996
6997         <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">
6998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
6999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7000                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7002                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7003                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7004             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7005                 </fields>
7006                 <links/>
7007         <permacrud>
7008             <actions>
7009                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7010                 <retrieve />
7011                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7012                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7013             </actions>
7014         </permacrud>
7015         </class>
7016
7017         <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">
7018                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7019                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7020                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7021                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7022                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7023                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7024                 </fields>
7025                 <links/>
7026         </class>
7027         <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">
7028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7029                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7030                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7031                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7032                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7033                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7034                 </fields>
7035                 <links>
7036                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7037                 </links>
7038         </class>
7039
7040         <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">
7041             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7042                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7043                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7044                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7045                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7046                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7047                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7048         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7049
7050             </fields>
7051             <links>
7052                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7053             </links>
7054             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7055                 <actions>
7056                     <create permission="ADMIN_PROVIDER">
7057                         <context link="provider" field="owner"/>
7058                     </create>
7059                     <retrieve permission="ADMIN_PROVIDER">
7060                         <context link="provider" field="owner"/>
7061                     </retrieve>
7062                     <update permission="ADMIN_PROVIDER">
7063                         <context link="provider" field="owner"/>
7064                     </update>
7065                     <delete permission="ADMIN_PROVIDER">
7066                         <context link="provider" field="owner"/>
7067                     </delete>
7068                 </actions>
7069             </permacrud>
7070         </class>
7071         
7072         <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">
7073             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7074                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7075                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7076                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7077                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7078             </fields>
7079             <links>
7080                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7081             </links>
7082             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7083                 <actions>
7084                     <create permission="ADMIN_PROVIDER">
7085                         <context link="provider" field="owner"/>
7086                     </create>
7087                     <retrieve permission="ADMIN_PROVIDER">
7088                         <context link="provider" field="owner"/>
7089                     </retrieve>
7090                     <update permission="ADMIN_PROVIDER">
7091                         <context link="provider" field="owner"/>
7092                     </update>
7093                     <delete permission="ADMIN_PROVIDER">
7094                         <context link="provider" field="owner"/>
7095                     </delete>
7096                 </actions>
7097             </permacrud>
7098         </class>
7099         
7100         <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">
7101             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7102                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7103                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7104                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7105                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7106                 </fields>
7107                 <links/>
7108         </class>
7109
7110         <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">
7111                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7112                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7113                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7114                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7115                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7116                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7117                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7118                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7119                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7120                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7121                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7122                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7123                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7124                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7125                 </fields>
7126                 <links>
7127                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7128                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7129                 </links>
7130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7131             <actions>
7132                 <create permission="ADMIN_PROVIDER">
7133                     <context link="provider" field="owner"/>
7134                 </create>
7135                 <retrieve permission="ADMIN_PROVIDER">
7136                     <context link="provider" field="owner"/>
7137                 </retrieve>
7138                 <update permission="ADMIN_PROVIDER">
7139                     <context link="provider" field="owner"/>
7140                 </update>
7141                 <delete permission="ADMIN_PROVIDER">
7142                     <context link="provider" field="owner"/>
7143                 </delete>
7144             </actions>
7145         </permacrud>
7146         </class>
7147
7148         <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">
7149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7150                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7151                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7152                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7153                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7154                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7155                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7156                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7157                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7158                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7159                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7160                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7161                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7162                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7163                 </fields>
7164                 <links>
7165                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7166                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7167                 </links>
7168         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7169             <actions>
7170                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7171                     <context link="account" jump="provider" field="owner"/>
7172                 </retrieve>
7173                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7174                     <context link="account" jump="provider" field="owner"/>
7175                 </update>
7176                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7177                     <context link="account" jump="provider" field="owner"/>
7178                 </delete>
7179             </actions>
7180         </permacrud>
7181         </class>
7182
7183
7184         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7185                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7186                         <field name="id" reporter:datatype="id" />
7187                         <field name="parent" reporter:datatype="link"/>
7188                         <field name="owner" reporter:datatype="link"/>
7189                         <field name="create_time" reporter:datatype="timestamp"/>
7190                         <field name="name" reporter:datatype="text"/>
7191                         <field name="shared" reporter:datatype="bool"/>
7192                         <field name="share_with" reporter:datatype="link"/>
7193                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7194                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7195                 </fields>
7196                 <links>
7197                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7198                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7199                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7200                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7201                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7202                 </links>
7203         </class>
7204         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7205                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7206                         <field name="id" reporter:datatype="id" />
7207                         <field name="parent" reporter:datatype="link"/>
7208                         <field name="owner" reporter:datatype="link"/>
7209                         <field name="create_time" reporter:datatype="timestamp"/>
7210                         <field name="name" reporter:datatype="text"/>
7211                         <field name="shared" reporter:datatype="bool"/>
7212                         <field name="share_with" reporter:datatype="link"/>
7213                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7215                 </fields>
7216                 <links>
7217                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7218                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7219                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7220                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7221                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7222                 </links>
7223         </class>
7224         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7225                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7226                         <field name="id" reporter:datatype="id" />
7227                         <field name="parent" reporter:datatype="link"/>
7228                         <field name="owner" reporter:datatype="link"/>
7229                         <field name="create_time" reporter:datatype="timestamp"/>
7230                         <field name="name" reporter:datatype="text"/>
7231                         <field name="shared" reporter:datatype="bool"/>
7232                         <field name="share_with" reporter:datatype="link"/>
7233                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7234                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7235                 </fields>
7236                 <links>
7237                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7238                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7239                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7240                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7241                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7242                 </links>
7243         </class>
7244         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7245                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7246                         <field name="id" reporter:datatype="id" />
7247                         <field name="owner" reporter:datatype="link"/>
7248                         <field name="create_time" reporter:datatype="timestamp"/>
7249                         <field name="name" reporter:datatype="text"/>
7250                         <field name="data" reporter:datatype="text"/>
7251                         <field name="folder" reporter:datatype="link"/>
7252                         <field name="description" reporter:datatype="text"/>
7253                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7254                 </fields>
7255                 <links>
7256                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7257                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7258                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7259                 </links>
7260         </class>
7261         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7262                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7263                         <field name="id" reporter:datatype="id" />
7264                         <field name="owner" reporter:datatype="link"/>
7265                         <field name="create_time" reporter:datatype="timestamp"/>
7266                         <field name="template" reporter:datatype="link"/>
7267                         <field name="data" reporter:datatype="text"/>
7268                         <field name="folder" reporter:datatype="link"/>
7269                         <field name="recur" reporter:datatype="bool"/>
7270                         <field name="recurrence" reporter:datatype="interval"/>
7271                         <field name="name" reporter:datatype="text"/>
7272                         <field name="description" reporter:datatype="text"/>
7273                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7274                 </fields>
7275                 <links>
7276                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7277                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7278                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7279                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7280                 </links>
7281         </class>
7282         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7283                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7284                         <field name="id" reporter:datatype="id" />
7285                         <field name="runner" reporter:datatype="link"/>
7286                         <field name="start_time" reporter:datatype="timestamp"/>
7287                         <field name="complete_time" reporter:datatype="timestamp"/>
7288                         <field name="run_time" reporter:datatype="timestamp"/>
7289                         <field name="email" reporter:datatype="text"/>
7290                         <field name="excel_format" reporter:datatype="bool"/>
7291                         <field name="csv_format" reporter:datatype="bool"/>
7292                         <field name="html_format" reporter:datatype="bool"/>
7293                         <field name="error_code" reporter:datatype="int"/>
7294                         <field name="error_text" reporter:datatype="text"/>
7295                         <field name="report" reporter:datatype="link"/>
7296                         <field name="folder" reporter:datatype="link"/>
7297                         <field name="chart_pie" reporter:datatype="bool"/>
7298                         <field name="chart_bar" reporter:datatype="bool"/>
7299                         <field name="chart_line" reporter:datatype="bool"/>
7300                 </fields>
7301                 <links>
7302                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7303                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7304                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7305                 </links>
7306         </class>
7307         <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">
7308                 <fields oils_persist:primary="id">
7309                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7310                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7311                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7312                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7313                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7314                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7315                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7316                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7317                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7318                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7319                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7320                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7321                 </fields>
7322                 <links>
7323                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7324                 </links>
7325         </class>
7326         <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">
7327                 <fields oils_persist:primary="id">
7328                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7329                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7330                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7331                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7332                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7333                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7334                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7335                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7336                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7337                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7338                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7339                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7340                 </fields>
7341                 <links>
7342                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7343                 </links>
7344         </class>
7345         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7346                 <fields oils_persist:primary="id">
7347                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7348                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7349                         <field reporter:label="Fingerprint" name="fingerprint" />
7350                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7351                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7352                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7353                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7354                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7355                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7356                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7357                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7358                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7359                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7360                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7361                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7362                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7363                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7364                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7365                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7366                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7367                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7368                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7369                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7370                 </fields>
7371                 <links>
7372                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7373                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7374                 </links>
7375         </class>
7376         <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">
7377                 <fields oils_persist:primary="id">
7378                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7379                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7380                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7381                 </fields>
7382                 <links>
7383                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7384                 </links>
7385         </class>
7386         <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">
7387                 <fields oils_persist:primary="id">
7388                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7389                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7390                 </fields>
7391                 <links>
7392                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7393                 </links>
7394         </class>
7395         <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">
7396                 <fields oils_persist:primary="id">
7397                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7398                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7399                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7400                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7401                 </fields>
7402                 <links>
7403                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7404                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7405                 </links>
7406         </class>
7407         <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">
7408                 <fields oils_persist:primary="xact">
7409                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7410                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7411                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7412                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7413                 </fields>
7414                 <links>
7415                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7416                 </links>
7417         </class>
7418         <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">
7419                 <fields oils_persist:primary="xact">
7420                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7421                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7422                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7423                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7424                 </fields>
7425                 <links>
7426                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7427                 </links>
7428         </class>
7429         <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)">
7430                 <fields oils_persist:primary="id">
7431                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7432                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7433                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7434                 </fields>
7435                 <links>
7436                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7437                 </links>
7438         </class>
7439         <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">
7440                 <fields oils_persist:primary="id">
7441                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7442                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7443                 </fields>
7444                 <links>
7445                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7446                 </links>
7447         </class>
7448         <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">
7449                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7450                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7451                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7452                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7453                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7454                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7455                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7456                 </fields>
7457                 <links>
7458                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7459                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7460                 </links>
7461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7462                         <actions>
7463                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7464                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7465                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7466                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7467                         </actions>
7468                 </permacrud>
7469         </class>
7470         <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">
7471                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7472                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7473                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7474                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7475                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7476                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7477                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7478                 </fields>
7479                 <links>
7480                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7481                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7482                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7483                 </links>
7484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7485                         <actions>
7486                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7487                                         <context link="formula" field="owner"/>
7488                                 </create>
7489                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7490                                         <context link="formula" field="owner"/>
7491                                 </retrieve>
7492                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7493                                         <context link="formula" field="owner"/>
7494                                 </update>
7495                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7496                                         <context link="formula" field="owner"/>
7497                                 </delete>
7498                         </actions>
7499                 </permacrud>
7500         </class>
7501
7502         <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">
7503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7504                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7505                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7507                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7508                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7509                 </fields>
7510                 <links>
7511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7512                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7513                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7514                 </links>
7515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7516                         <actions>
7517                                 <create permission="CREATE_PURCHASE_ORDER">
7518                                         <context link="formula" field="owner"/>
7519                 </create>
7520                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7521                                         <context link="formula" field="owner"/>
7522                 </retrieve>
7523                                 <update permission="CREATE_PURCHASE_ORDER">
7524                                         <context link="formula" field="owner"/>
7525                 </update>
7526                                 <delete permission="CREATE_PURCHASE_ORDER">
7527                                         <context link="formula" field="owner"/>
7528                 </delete>
7529                         </actions>
7530                 </permacrud>
7531         </class>
7532
7533         <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">
7534                 <fields oils_persist:primary="id">
7535                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7536                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7537                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7538                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7539                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7540                 </fields>
7541                 <links>
7542                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7543                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7544                 </links>
7545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7546                 </permacrud>
7547         </class>
7548
7549         <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">
7550                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7551                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7552                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7553                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7554                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7555                 </fields>
7556                 <links>
7557                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                         <actions>
7561                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7562                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7563                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7564                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7565                         </actions>
7566                 </permacrud>
7567         </class>
7568
7569         <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">
7570                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7571                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7572                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7573                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7574                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7575                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7576                 </fields>
7577                 <links>
7578                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7579                 </links>
7580                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7581                         <actions>
7582                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7583                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7584                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7585                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7586                         </actions>
7587                 </permacrud>
7588         </class>
7589
7590         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7591                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7592                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7593                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7594                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7595                 </fields>
7596                 <links>
7597                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7598                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7599                 </links>
7600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7601                 </permacrud>
7602         </class>
7603
7604         <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">
7605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7606                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7607                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7608                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7609                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7610                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7612                 </fields>
7613                 <links>
7614                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7615                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7616                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7617                 </links>
7618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7619                 </permacrud>
7620         </class>
7621
7622         <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">
7623                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7624                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7625                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7626                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7627                 </fields>
7628                 <links>
7629                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7630                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7631                 </links>
7632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633                 </permacrud>
7634         </class>
7635
7636         <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">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7638                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7639                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7640                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7641                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7642                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7643                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7644                 </fields>
7645                 <links>
7646                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7647                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7648                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7649                 </links>
7650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7651                 </permacrud>
7652         </class>
7653
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7656                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7657                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7658                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7659                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7660                 </fields>
7661                 <links>
7662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7663                 </links>
7664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7665             <actions>
7666                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7667                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7668                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7669                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7670             </actions>
7671                 </permacrud>
7672         </class>
7673
7674         <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">
7675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7676                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7677                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7678                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7679                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7680                 </fields>
7681                 <links>
7682                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7683                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7684                 </links>
7685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7686                         <actions>
7687                                 <create permission="ADMIN_CLAIM_POLICY">
7688                                         <context link="claim_policy" field="org_unit"/>
7689                 </create>
7690                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7691                                         <context link="claim_policy" field="org_unit"/>
7692                 </retrieve>
7693                                 <update permission="ADMIN_CLAIM_POLICY">
7694                                         <context link="claim_policy" field="org_unit"/>
7695                 </update>
7696                                 <delete permission="ADMIN_CLAIM_POLICY">
7697                                         <context link="claim_policy" field="org_unit"/>
7698                 </delete>
7699                         </actions>
7700                 </permacrud>
7701         </class>
7702
7703     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7704         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7705             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7706             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7707             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7708             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7709             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7710             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7711             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7712             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7713             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7714             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7715             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7716             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7717             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7718             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7719             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7720         </fields>
7721     </class>
7722
7723     <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">
7724         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7725             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7726             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7727             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7728             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7729             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7730         </fields>
7731     </class>
7732
7733     <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">
7734         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7735             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7736             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7737             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7738             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7739             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7740             <field reporter:label="City" name="city" reporter:datatype="text"/>
7741             <field reporter:label="State" name="state" reporter:datatype="text"/>
7742             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7743             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7744             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7745         </fields>
7746     </class>
7747
7748     <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">
7749         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7750             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7751             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7752             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7753             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7754             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7755             <field reporter:label="City" name="city" reporter:datatype="text"/>
7756             <field reporter:label="State" name="state" reporter:datatype="text"/>
7757             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7758             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7759             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7760         </fields>
7761     </class>
7762
7763     <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">
7764         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7765             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7766             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7767             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7768             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7769             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7770             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7771         </fields>
7772     </class>
7773
7774         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7775                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7776                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7777                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7778                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7779                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7780                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7781                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7782                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7783                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7784                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7785                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7786                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7787                 </fields>
7788                 <links>
7789                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7790                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7791                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7792                 </links>
7793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7794                 </permacrud>
7795         </class>
7796
7797         <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">
7798                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7799                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7800                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7801                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7802                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7803                 </fields>
7804                 <links>
7805                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7806                 </links>
7807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808                 </permacrud>
7809         </class>
7810
7811     <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">
7812         <fields>
7813             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7814             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7815             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7816         </fields>
7817                 <links>
7818                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7819                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7820                 </links>
7821     </class>
7822
7823     <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">
7824         <fields>
7825             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7826             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7827         </fields>
7828                 <links>
7829                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7830                 </links>
7831     </class>
7832
7833     <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">
7834         <fields>
7835             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7836             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7837             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7838         </fields>
7839                 <links>
7840                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7841                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7842                 </links>
7843     </class>
7844
7845     <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">
7846         <fields>
7847             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7848             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7849         </fields>
7850                 <links>
7851                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7852                 </links>
7853     </class>
7854
7855     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7856                 <oils_persist:source_definition>
7857
7858             SELECT  DISTINCT l.*
7859               FROM  action.unfulfilled_hold_loops l
7860                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7861               WHERE l.count = m.max
7862
7863                 </oils_persist:source_definition>
7864         <fields>
7865             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7866             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7867             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7868         </fields>
7869                 <links>
7870                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7871                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7872                 </links>
7873     </class>
7874
7875         <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">
7876                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
7877                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
7878                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
7879                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
7880                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
7881                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
7882                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
7883                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
7884                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
7885                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
7886                 </fields>
7887                 <links>
7888                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
7889                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
7890                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
7891                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
7892                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
7893                 </links>
7894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7895                 </permacrud>
7896         </class>
7897
7898         <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">
7899                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
7900                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
7901                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
7902                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7903                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
7904                 </fields>
7905                 <links>
7906                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
7907                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
7908                 </links>
7909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7910                 </permacrud>
7911         </class>
7912
7913         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
7915                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
7916                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
7917                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
7918                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
7919                 </fields>
7920                 <links>
7921                 </links>
7922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7923                 </permacrud>
7924         </class>
7925
7926         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
7927                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
7928                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
7929                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
7930                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7931                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
7932                 </fields>
7933                 <links>
7934                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
7935                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
7936                 </links>
7937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7938                 </permacrud>
7939         </class>
7940         
7941         <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">
7942                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
7943                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
7944                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
7945                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
7946                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
7947                 </fields>
7948                 <links>
7949                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
7950                 </links>
7951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7952                 </permacrud>
7953         </class>
7954         
7955         <class id="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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
7957                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
7958                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7959                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7960                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
7961                 </fields>
7962                 <links>
7963                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
7964                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
7965                 </links>
7966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7967                 </permacrud>
7968         </class>
7969
7970         <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">
7971                 <fields oils_persist:primary="name">
7972                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
7973                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7974                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
7975                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7976                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
7977                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
7978                 </fields>
7979                 <links>
7980                 </links>
7981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7982                 </permacrud>
7983         </class>
7984
7985         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
7987                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
7988                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
7989                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
7990                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
7991                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
7992                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
7993                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
7994                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
7995                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
7996                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
7997                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
7998                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
7999                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8000                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8001                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8002                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8003                 </fields>
8004                 <links>
8005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8006                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8007                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8008                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8009                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8010                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8011                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8012                 </links>
8013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8014                 </permacrud>
8015         </class>
8016
8017         <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">
8018                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8019                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8020                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8021                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8022                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8023                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8024                 </fields>
8025                 <links>
8026                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8027                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8028                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8029                 </links>
8030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8031                 </permacrud>
8032         </class>
8033
8034         <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">
8035                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8036                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8037                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8038                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8039                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8040                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8041                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8042                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8043                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8044                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8045                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8046                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8047                 </fields>
8048                 <links>
8049                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8050                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8051                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8052                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8053                 </links>
8054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8055                 </permacrud>
8056         </class>
8057
8058         <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">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8060                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8061                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8062                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8063                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8064                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8065                 </fields>
8066                 <links>
8067                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8068                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8069                 </links>
8070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8071                 </permacrud>
8072         </class>
8073
8074         <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">
8075                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8076                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8077                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8078                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8079                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8080                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8081                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8082                 </fields>
8083                 <links>
8084                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8085                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8086                 </links>
8087                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8088                 </permacrud>
8089         </class>
8090
8091         <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">
8092                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8093                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8094                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8095                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8096                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8097                 </fields>
8098                 <links>
8099                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8100                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8101                 </links>
8102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8103                 </permacrud>
8104         </class>
8105
8106         <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">
8107                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8108                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8109                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8110                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8111                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8112                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8113                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8114                 </fields>
8115                 <links>
8116                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8117                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8118                 </links>
8119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8120                 </permacrud>
8121         </class>
8122
8123         <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">
8124                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8125                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8126                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8127                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8128                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8129                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8130                 </fields>
8131                 <links>
8132                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8133                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8134                 </links>
8135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8136                 </permacrud>
8137         </class>
8138
8139         <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">
8140                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8141                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8142                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8143                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8144                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8145                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8146                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8147                 </fields>
8148                 <links>
8149                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8150                 </links>
8151                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8152                 </permacrud>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8157                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8158                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8159                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8160                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8161                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8162                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8163                 </fields>
8164                 <links>
8165                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8166                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8167                 </links>
8168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8169                 </permacrud>
8170         </class>
8171
8172         <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">
8173                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8174                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8175                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8176                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8177                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8178                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8179                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8180                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8181                 </fields>
8182                 <links>
8183                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8184                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8185                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8186                 </links>
8187                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8188                 </permacrud>
8189         </class>
8190
8191         <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">
8192                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8193                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8194                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8195                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8196                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8197                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8198                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8199                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8200                 </fields>
8201                 <links>
8202                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8203                 </links>
8204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8205                 </permacrud>
8206         </class>
8207
8208         <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">
8209                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8210                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8211                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8212                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8213                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8214                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8215                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8216                 </fields>
8217                 <links>
8218                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8219                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8220                 </links>
8221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8222                 </permacrud>
8223         </class>
8224
8225         <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">
8226                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8227                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8228                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8229                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8230                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8231                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8232                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8233                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8234                 </fields>
8235                 <links>
8236                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8237                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8238                 </links>
8239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8240                 </permacrud>
8241         </class>
8242
8243         <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">
8244                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8245                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8246                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8247                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8248                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8249                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8250                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8251                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8252                 </fields>
8253                 <links>
8254                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8255                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8256                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8257                 </links>
8258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8259                 </permacrud>
8260         </class>
8261
8262         <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">
8263                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8264                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8265                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8266                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8267                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8268                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8269                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8270                 </fields>
8271                 <links>
8272                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8273                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8274                 </links>
8275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8276                 </permacrud>
8277         </class>
8278
8279         <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">
8280                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8281                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8282                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8283                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8284                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8285                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8286                 </fields>
8287                 <links>
8288                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8289                 </links>
8290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8291                 </permacrud>
8292         </class>
8293
8294         <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">
8295                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8296                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8297                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8298                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8299                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8300                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8301                 </fields>
8302                 <links>
8303                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8304                 </links>
8305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8306                 </permacrud>
8307         </class>
8308
8309         <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">
8310                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8311                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8312                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8313                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8314                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8315                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8316                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8317                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8318                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8319                 </fields>
8320                 <links>
8321                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8322                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8323                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8324                 </links>
8325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8326                 </permacrud>
8327         </class>
8328
8329         <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">
8330                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8331                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8332                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8333                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8334                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8335                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8336                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8337                 </fields>
8338                 <links>
8339                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8340                 </links>
8341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8342                 </permacrud>
8343         </class>
8344
8345         <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">
8346                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8347                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8348                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8349                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8350                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8351                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8352                 </fields>
8353                 <links>
8354                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8355                 </links>
8356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8357                 </permacrud>
8358         </class>
8359
8360         <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">
8361                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8362                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8363                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8364                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8365                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8366                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8367                 </fields>
8368                 <links>
8369                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8370                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8371                 </links>
8372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8373                 </permacrud>
8374         </class>
8375
8376         <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">
8377                 <fields oils_persist:primary="id">
8378                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8379                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8380                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8381                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8382                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8383                 </fields>
8384                 <links>
8385                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8386                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8387                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8388                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8389                 </links>
8390         </class>
8391
8392         <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">
8393                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8394                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8395                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8396                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8397                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8398                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8399                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8400                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8401                 </fields>
8402                 <links/>
8403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8404                         <actions>
8405                                 <retrieve/>
8406                         </actions>
8407                 </permacrud>
8408         </class>
8409
8410         <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">
8411                 <fields oils_persist:primary="ptype_key">
8412                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8413                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8414                 </fields>
8415                 <links/>
8416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8417                         <actions>
8418                                 <retrieve/>
8419                         </actions>
8420                 </permacrud>
8421         </class>
8422
8423         <class id="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">
8424                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8426                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8427                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8428                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8429                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8430                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8431                 </fields>
8432                 <links>
8433                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8434                 </links>
8435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8436                         <actions>
8437                                 <retrieve/>
8438                         </actions>
8439                 </permacrud>
8440         </class>
8441
8442         <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">
8443                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8445                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8446                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8447                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8448                 </fields>
8449                 <links>
8450                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8451                 </links>
8452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8453                         <actions>
8454                                 <retrieve/>
8455                         </actions>
8456                 </permacrud>
8457         </class>
8458
8459         <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">
8460                 <fields oils_persist:primary="code">
8461                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8462                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8463                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8464                 </fields>
8465                 <links/>
8466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8467                         <actions>
8468                                 <retrieve/>
8469                         </actions>
8470                 </permacrud>
8471         </class>
8472
8473         <class id="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">
8474                 <oils_persist:source_definition>
8475
8476             SELECT  b.id,
8477                     MAX(dcp.edit_date) AS last_delete_date
8478              FROM   biblio.record_entry b
8479                     JOIN asset.call_number cn ON (cn.record = b.id)
8480                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8481              WHERE  NOT b.deleted
8482              GROUP BY b.id
8483              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8484
8485                 </oils_persist:source_definition>
8486                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8487                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8488                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8489                 </fields>
8490                 <links>
8491                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8492                 </links>
8493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8494                         <actions>
8495                                 <retrieve/>
8496                         </actions>
8497                 </permacrud>
8498         </class>
8499
8500         <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">
8501                 <oils_persist:source_definition>
8502
8503             -- -- 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.
8504             -- -- 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
8505             -- -- may not.
8506             -- SELECT
8507             --     bre.id AS "bib_id",
8508             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8509             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8510             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8511             -- FROM (
8512                 SELECT
8513                     y.bre AS "id",
8514                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8515                     y.hold_count AS "hold_count",
8516                     (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"
8517                 FROM (
8518                         SELECT
8519                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8520                             COUNT(*) AS "hold_count"
8521                         FROM action.hold_request h
8522                         WHERE
8523                             cancel_time IS NULL
8524                             AND fulfillment_time IS NULL
8525                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8526                         GROUP BY 1
8527                     )y LEFT JOIN (
8528                         SELECT 
8529                             (SELECT id
8530                                 FROM biblio.record_entry 
8531                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8532                             ) AS "bre", 
8533                             COUNT(*) AS "copy_count"
8534                         FROM asset.copy
8535                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8536                         WHERE copy.holdable 
8537                             AND NOT copy.deleted 
8538                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8539                         GROUP BY 1
8540                     )x ON x.bre = y.bre
8541                 -- )z RIGHT JOIN (
8542                 --     SELECT id
8543                 --     FROM biblio.record_entry
8544                 --     WHERE NOT deleted
8545                 -- )bre ON (z.bib_id = bre.id)
8546                 
8547
8548                 </oils_persist:source_definition>
8549                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8550                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8551                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8552                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8553                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8554                 </fields>
8555                 <links>
8556                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8557                 </links>
8558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8559                         <actions>
8560                                 <retrieve/>
8561                         </actions>
8562                 </permacrud>
8563         </class>
8564
8565         <!-- ********************************************************************************************************************* -->
8566         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8567         <!-- ********************************************************************************************************************* -->
8568         <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">
8569                 <fields oils_persist:primary="id">
8570                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8571                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8572                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8573                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8574                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8575                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8576                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8577                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8578                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8579                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8580                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8581                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8582                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8583                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8584                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8585                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8586                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8587                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8588                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8589                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8590                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8591                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8592                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8593                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8594                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8595                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8596                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8597                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8598                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8599                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8600                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8601                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8602                 </fields>
8603                 <links>
8604                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8605                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8606                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8607                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8608                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8609                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8610                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8611                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8612                 </links>
8613         </class>
8614
8615         <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">
8616                 <fields oils_persist:primary="id">
8617                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8618                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8619                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8620                 </fields>
8621                 <links>
8622                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8623                 </links>
8624         </class>
8625
8626         <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">
8627                 <fields oils_persist:primary="id">
8628                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8629                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8630                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8631                 </fields>
8632                 <links>
8633                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8634                 </links>
8635         </class>
8636
8637         <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">
8638                 <fields oils_persist:primary="id">
8639                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8640
8641                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8642                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8643                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8644
8645                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8646                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8647                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8648
8649                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8650                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8651
8652                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8653                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8654                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8655
8656                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8657                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8658
8659                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8660                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8661                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8662
8663                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8664                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8665                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8666
8667                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8668                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8669                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8670                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8671
8672                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8673                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8674
8675                 </fields>
8676                 <links>
8677                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8679                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8680                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8681                 </links>
8682         </class>
8683
8684         <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">
8685                 <oils_persist:source_definition>
8686
8687             SELECT
8688                 po.ordering_agency AS ordering_agency,
8689                 po.id AS purchase_order,
8690                 li.id AS lineitem,
8691                 lid.id AS lineitem_detail,
8692                 cpa.id AS claim_policy_action
8693             FROM
8694                 acq.lineitem_detail lid
8695                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8696                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8697                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8698                 JOIN acq.claim_policy_action cpa ON (
8699                     cpa.claim_policy = cp.id
8700
8701                     -- we only care about claim policy actions whose claim
8702                     -- interval we'd reached or exceeded
8703                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8704
8705                     -- filter out all claim policy actions where claim events
8706                     -- have occurred on or after the action's action_interval
8707                     AND NOT EXISTS (
8708                         SELECT 1
8709                         FROM
8710                             acq.claim_event evt
8711                             JOIN acq.claim claim ON (
8712                                 claim.id = evt.claim
8713                                 AND claim.lineitem_detail = lid.id
8714                             )
8715                         WHERE
8716                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8717                     )
8718                 )
8719             WHERE
8720                 lid.cancel_reason IS NULL
8721                 AND li.cancel_reason IS NULL -- belt/suspenders
8722                 AND po.cancel_reason IS NULL -- belt/suspenders
8723                 AND lid.recv_time IS NULL
8724                 AND po.state = 'on-order'
8725             ORDER BY 1, 2, 3, 4, 5
8726
8727                 </oils_persist:source_definition>
8728                 <fields>
8729                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8730                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8731                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8732                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8733                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8734                 </fields>
8735                 <links>
8736                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8737                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8738                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8739                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8740                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8741                 </links>
8742         </class>
8743
8744         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8745                 <oils_persist:source_definition>
8746
8747             SELECT 
8748                 li.id AS lineitem, 
8749                 (
8750                     SELECT COUNT(lid.id) 
8751                     FROM acq.lineitem_detail lid
8752                     WHERE lineitem = li.id
8753                 ) AS item_count,
8754                 (
8755                     SELECT COUNT(lid.id) 
8756                     FROM acq.lineitem_detail lid
8757                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8758                 ) AS recv_count,
8759                 (
8760                     SELECT COUNT(lid.id) 
8761                     FROM acq.lineitem_detail lid
8762                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8763                 ) AS cancel_count,
8764                 (
8765                     SELECT COUNT(lid.id) 
8766                     FROM acq.lineitem_detail lid
8767                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8768                     WHERE NOT debit.encumbrance AND lineitem = li.id
8769                 ) AS invoice_count,
8770                 (
8771                     SELECT COUNT(DISTINCT(lid.id)) 
8772                     FROM acq.lineitem_detail lid
8773                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8774                     WHERE lineitem = li.id
8775                 ) AS claim_count,
8776                 (
8777                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8778                     FROM acq.lineitem_detail lid
8779                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8780                 ) AS estimated_amount,
8781                 (
8782                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8783                     FROM acq.lineitem_detail lid
8784                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8785                     WHERE debit.encumbrance AND lineitem = li.id
8786                 ) AS encumbrance_amount,
8787                 (
8788                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8789                     FROM acq.lineitem_detail lid
8790                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8791                     WHERE NOT debit.encumbrance AND lineitem = li.id
8792                 ) AS paid_amount
8793
8794                 FROM acq.lineitem AS li
8795         </oils_persist:source_definition>
8796                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
8797                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8798                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8799                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
8800                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
8801                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
8802                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
8803                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
8804                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
8805                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
8806                 </fields>
8807                 <links>
8808                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8809                 </links>
8810     </class>
8811
8812
8813         <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">
8814                 <oils_persist:source_definition>
8815
8816                         SELECT  t.*
8817                           FROM  action.transit_copy t
8818                                 JOIN actor.org_unit AS s ON (t.source = s.id)
8819                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
8820                           WHERE s.parent_ou &lt;&gt; d.parent_ou
8821
8822                 </oils_persist:source_definition>
8823                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8824                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
8825                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
8826                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8827                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
8828                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
8829                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
8830                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
8831                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8832                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8833                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8834                 </fields>
8835                 <links>
8836                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
8837                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8838                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8839                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8840                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8841                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
8842                 </links>
8843         </class>
8844
8845     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
8846                 <oils_persist:source_definition>
8847
8848         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
8849                 SELECT
8850                         cp.id as copy,
8851                         COUNT(circ.id),
8852                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8853                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8854                 FROM
8855                         asset.copy cp
8856                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
8857                 GROUP BY 1, 3, 4
8858                 UNION
8859                 SELECT
8860                         cp.id as copy,
8861                         COUNT(circ.id),
8862                         EXTRACT(YEAR FROM circ.xact_start) AS year,
8863                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
8864                 FROM
8865                         asset.copy cp
8866                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
8867                 GROUP BY 1, 3, 4
8868                 UNION
8869                 SELECT
8870                         id as copy,
8871                         circ_count,
8872                         -1 AS year,
8873                         false as is_renewal
8874                 FROM
8875                         extend_reporter.legacy_circ_count
8876         )x GROUP BY 1, 3, 4
8877
8878                 </oils_persist:source_definition>
8879         <fields>
8880             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
8881             <field reporter:label="Count" name="count" reporter:datatype="int"/>
8882             <field reporter:label="Year" name="year" reporter:datatype="int"/>
8883             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
8884         </fields>
8885                 <links>
8886                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
8887                 </links>
8888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8889                         <actions>
8890                                 <retrieve/>
8891                         </actions>
8892                 </permacrud>
8893     </class>
8894
8895         <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">
8896                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
8897                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
8898                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
8899                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
8900                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
8901                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
8902                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
8903                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
8904                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
8905                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
8906                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
8907                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
8908                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
8909                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
8910                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
8911                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
8912                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
8913                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
8914                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
8915                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
8916                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
8917                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
8918                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
8919                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
8920                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
8921                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
8922                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
8923                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
8924                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
8925                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
8926                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
8927                 </fields>
8928                 <links>
8929                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
8930                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
8931                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
8932                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8933                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
8934                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8935                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8936                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
8937                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
8938                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
8939                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
8940                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
8941                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
8942                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
8943                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
8944                 </links>
8945         </class>
8946
8947     <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">
8948         <fields oils_persist:primary="id">
8949             <field reporter:label="Title" name="title" reporter:datatype="text"/>
8950             <field reporter:label="Author" name="author" reporter:datatype="text"/>
8951             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
8952             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
8953             <field reporter:label="Price" name="price" reporter:datatype="money"/>
8954             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8955             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
8956             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
8957             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8958             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
8959             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8960             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
8961             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
8962             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
8963             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8964             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8965             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
8966             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8967             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
8968             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
8969             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
8970             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
8971             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8972             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
8973             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
8974             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
8975             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
8976             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
8977             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
8978             <field reporter:label="Status" name="status" reporter:datatype="link"/>
8979             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
8980             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
8981             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
8982             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
8983         </fields>
8984         <links>
8985             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8986             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8987             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8988             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
8989             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
8990         </links>
8991     </class>
8992
8993     <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">
8994         <fields oils_persist:primary="id">
8995             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
8996             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8997             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
8998             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
8999         </fields>
9000         <links>
9001             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9002             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9003         </links>
9004     </class>
9005
9006     <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">
9007         <fields oils_persist:primary="owning_lib">
9008             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9009             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9010             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9011         </fields>
9012         <links>
9013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9014         </links>
9015     </class>
9016
9017     <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">
9018         <fields oils_persist:primary="id">
9019             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9020             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9021             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9022             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9023             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9024         </fields>
9025         <links>
9026             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9027             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9028             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9029         </links>
9030     </class>
9031
9032     <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">
9033         <fields oils_persist:primary="circ_lib">
9034             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9035             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9036             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9037             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9038         </fields>
9039         <links>
9040             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9041             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9042         </links>
9043     </class>
9044
9045     <class id="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">
9046         <fields oils_persist:primary="id">
9047             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9048             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9049             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9050             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9051             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9052         </fields>
9053         <links>
9054             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9055             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9056             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9057         </links>
9058     </class>
9059
9060     <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">
9061         <fields oils_persist:primary="home_ou">
9062             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9063             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9064             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9065             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9066         </fields>
9067         <links>
9068             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9069             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9070         </links>
9071     </class>
9072         <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">
9073                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9074                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9075                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9076                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9077                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9078                 </fields>
9079                 <links>
9080                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9081                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9082                 </links>
9083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9084                         <actions>
9085                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9086                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9087                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9088                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9089                         </actions>
9090                 </permacrud>
9091         </class>
9092         <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">
9093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9094                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9095                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9096                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9097                 </fields>
9098                 <links>
9099                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9100                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9101                         </links>
9102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9103                 <actions>
9104                                 <create permission="ADMIN_ACQ_FUND_TAG">
9105                                         <context link="tag" field="owner"/>
9106                                 </create>
9107                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9108                                         <context link="tag" field="owner"/>
9109                                 </retrieve>
9110                                 <update permission="ADMIN_ACQ_FUND_TAG">
9111                                         <context link="tag" field="owner"/>
9112                                 </update>
9113                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9114                                         <context link="tag" field="owner"/>
9115                                 </delete>
9116                         </actions>
9117                 </permacrud>
9118         </class>
9119         <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">
9120                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9121                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9122                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9123                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9124                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9125                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9126                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9127                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9128                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9129                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9130                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9131                 </fields>
9132                 <links>
9133                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9134                 </links>
9135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9136                         <actions>
9137                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9138                                 <retrieve/>
9139                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9140                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9141                         </actions>
9142                 </permacrud>
9143         </class>
9144
9145         <!-- ********************************************************************************************************************* -->
9146
9147 </IDL>
9148
9149 <!--
9150     vim:noet:ts=4:sw=4:
9151 -->