]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Copy Location Search Groups : DB / IDL
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
731                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
732                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
733             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
734                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
735                 </fields>
736                 <links/>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
740                 <retrieve/>
741                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
742                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
743             </actions>
744         </permacrud>
745         </class>
746
747         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
748                 <fields oils_persist:primary="id">
749                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
750                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
751                 </fields>
752                 <links>
753                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <retrieve/>
758             </actions>
759         </permacrud>
760         </class>
761
762         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
785                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
786                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
787                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
788                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
789                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
791                 </fields>
792                 <links>
793                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
794                 </links>
795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
796             <actions>
797                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
798                 <retrieve/>
799                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
800                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
801             </actions>
802         </permacrud>
803         </class>
804
805         <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">
806                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
807                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
808                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
809                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
810                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
811                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
812                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
813                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
814                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
815                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
816                 </fields>
817                 <links>
818                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
819                 </links>
820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
821             <actions>
822                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
823                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
824                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
825                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
826             </actions>
827         </permacrud>
828         </class>
829
830     <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">
831         <fields oils_persist:primary="name">
832             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
833             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
834             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
835             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
836             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
837             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
838             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
839             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
840             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
841             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
842         </fields>
843         <links>
844             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
845             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
846         </links>
847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
848             <actions>
849                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
850                 <retrieve/>
851                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
852                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
853             </actions>
854         </permacrud>
855     </class>
856
857     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
858         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
859             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
860             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
861             <field reporter:label="Name" name="name" reporter:datatype="text"/>
862             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
863             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
864             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
865             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
866         </fields>
867         <links>
868             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
869         </links>
870     </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
874                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
875                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
876                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
877                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
878                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
879                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
880                 </fields>
881                 <links>
882             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
883             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
884                 </links>
885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
886                         <actions>
887                                 <retrieve/>
888                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
889                         </actions>
890                 </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="key">
895                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
896                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
897                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
898                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
899                 </fields>
900                 <links/>
901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
902                         <actions>
903                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
904                                 <retrieve/>
905                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
906                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
907                         </actions>
908                 </permacrud>
909         </class>
910
911         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
912                 <fields oils_persist:primary="module">
913                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
914                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
915                 </fields>
916                 <links/>
917         </class>
918
919         <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">
920                 <fields oils_persist:primary="module">
921                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
922                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
923                 </fields>
924                 <links/>
925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926                         <actions>
927                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
928                                 <retrieve/>
929                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
930                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
931                         </actions>
932                 </permacrud>
933         </class>
934
935         <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">
936                 <fields oils_persist:primary="module">
937                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
939                 </fields>
940                 <links/>
941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
942                         <actions>
943                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
944                                 <retrieve/>
945                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
946                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
947                         </actions>
948                 </permacrud>
949         </class>
950
951         <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">
952                 <fields oils_persist:primary="module">
953                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
954                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
955                 </fields>
956                 <links/>
957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
958                         <actions>
959                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
960                                 <retrieve/>
961                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
962                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
963                         </actions>
964                 </permacrud>
965         </class>
966
967         <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">
968                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
969                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
970                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
971                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
972                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
973                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
974                 </fields>
975                 <links>
976                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
977                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
978                 </links>
979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
980                         <actions>
981                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
982                     <context link="event_def" field="owner"/>
983                 </create>
984                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
985                     <context link="event_def" field="owner"/>
986                 </retrieve>
987                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
988                     <context link="event_def" field="owner"/>
989                 </update>
990                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
991                     <context link="event_def" field="owner"/>
992                 </delete>
993                         </actions>
994                 </permacrud>
995         </class>
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1001                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1002                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1003                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1004                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1005                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1006                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1007                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1008                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1009                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1010                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1011                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1012                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1013                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1014                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1015                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1016                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1017                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1018                 </fields>
1019                 <links>
1020                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1021                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1022                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1023                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1024                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1025                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1026                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1027                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1028                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1029                 </links>
1030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031                         <actions>
1032                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1033                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1034                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1035                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1036                         </actions>
1037                 </permacrud>
1038         </class>
1039
1040         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1041                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1042                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1043                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1044                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1045                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1046                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1047                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1048                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1049                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1050                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1051                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1052                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1053                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1054                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1055                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1056                 </fields>
1057                 <links>
1058                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1059                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1060                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1061                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1062                 </links>
1063         </class>
1064
1065         <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">
1066                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1067                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1068                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1069                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1070                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                 </links>
1075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1076                         <actions>
1077                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1078                     <context link="event_def" field="owner"/>
1079                 </create>
1080                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1081                     <context link="event_def" field="owner"/>
1082                 </retrieve>
1083                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1084                     <context link="event_def" field="owner"/>
1085                 </update>
1086                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1087                     <context link="event_def" field="owner"/>
1088                 </delete>
1089                         </actions>
1090                 </permacrud>
1091         </class>
1092
1093         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1095                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1096                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1097                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1098                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1099                 </fields>
1100                 <links>
1101                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1102                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1103                 </links>
1104         </class>
1105
1106         <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">
1107                 <fields oils_persist:primary="code">
1108                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1109                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1110                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1112                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1113                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1114                 </fields>
1115                 <links/>
1116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1117             <actions>
1118                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1119                 <retrieve/>
1120                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1121                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1122             </actions>
1123         </permacrud>
1124         </class>
1125
1126         <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">
1127                 <fields oils_persist:primary="code">
1128                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1129                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1130                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1131                 </fields>
1132                 <links/>
1133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1134             <actions>
1135                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1136                 <retrieve/>
1137                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1138                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1139             </actions>
1140         </permacrud>
1141         </class>
1142
1143         <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">
1144                 <fields oils_persist:primary="code">
1145                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1146                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1147                 </fields>
1148                 <links/>
1149         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1150             <actions>
1151                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1152                 <retrieve/>
1153                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1154                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1155             </actions>
1156         </permacrud>
1157         </class>
1158
1159         <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">
1160                 <fields oils_persist:primary="code">
1161                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1162                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1163                 </fields>
1164                 <links/>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1170                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="code">
1177                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1178                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1179                 </fields>
1180                 <links/>
1181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1182             <actions>
1183                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1184                 <retrieve/>
1185                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1186                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1187             </actions>
1188         </permacrud>
1189         </class>
1190
1191         <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">
1192                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1193                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1194                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1195                 </fields>
1196                 <links/>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1202                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205         </class>
1206
1207         <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">
1208                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1209                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1210                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1211                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1212                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1213                 </fields>
1214         <links>
1215             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1216             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1217             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1218         </links>
1219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1220             <actions>
1221                 <create permission="UPDATE_COPY">
1222                     <context link="target_copy" field="circ_lib"/>
1223                 </create>
1224                 <retrieve/>
1225                 <update permission="UPDATE_COPY">
1226                     <context link="target_copy" field="circ_lib"/>
1227                 </update>
1228                 <delete permission="UPDATE_COPY">
1229                     <context link="target_copy" field="circ_lib"/>
1230                 </delete>
1231             </actions>
1232         </permacrud>
1233         </class>
1234
1235         <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">
1236                 <fields oils_persist:primary="code">
1237                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1238                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1239                 </fields>
1240                 <links/>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1246                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249         </class>
1250
1251         <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">
1252                 <fields oils_persist:primary="code">
1253                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1254                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1255                 </fields>
1256                 <links/>
1257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1258             <actions>
1259                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1260                 <retrieve/>
1261                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1262                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1263             </actions>
1264         </permacrud>
1265         </class>
1266
1267         <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">
1268                 <fields oils_persist:primary="code">
1269                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1270                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1271                 </fields>
1272                 <links/>
1273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1274             <actions>
1275                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1276                 <retrieve/>
1277                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1278                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1279             </actions>
1280         </permacrud>
1281         </class>
1282
1283     <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">
1284         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1285             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1286             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1287             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1288             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1289             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1290             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1291             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1292             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1293             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1294             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1295             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1296             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1297             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1298             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1299             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1300         </fields>
1301         <links/>
1302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1303             <actions>
1304                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1305                 <retrieve/>
1306                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1307                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1308             </actions>
1309         </permacrud>
1310     </class>
1311
1312     <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">
1313         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1314             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1315             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1316             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1317             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1318             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1319             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1320             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1321             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1322             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1323             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1324             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1325             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1326             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1327             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1328             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1329         </fields>
1330         <links/>
1331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332             <actions>
1333                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1334                 <retrieve/>
1335                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1336                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1337             </actions>
1338         </permacrud>
1339     </class>
1340
1341     <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">
1342         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1343             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1344             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1345             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1346             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1347             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1348         </fields>
1349         <links>
1350             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1351             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1352             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1353         </links>
1354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1355             <actions>
1356                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1357                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1358                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1359                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1360             </actions>
1361         </permacrud>
1362     </class>
1363
1364         <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">
1365                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1366                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1367                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1368                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1369                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1370                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1371                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1372                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1373                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1374                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1375                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1376                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1377                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1378                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1379                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1380                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1381                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1382             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1383                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1384                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1385                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1386                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1387                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1388                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1389                 </fields>
1390                 <links>
1391                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1392                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1393                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1394                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1395                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1396                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1397                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1398                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1399                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1400                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1401                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1402                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1403                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1404             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1405                 </links>
1406         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1407             <actions>
1408                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1409                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1410                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1411                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1412             </actions>
1413         </permacrud>
1414         </class>
1415
1416         <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">
1417                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1418                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1419                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1420                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1421                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1422                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1423                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1424                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1425                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1426                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1427                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1428                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1429                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1430                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1431                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1432             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1433                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1434                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1435             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1436                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1437                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1438                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1439                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1440             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1441             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1442             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1443                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1444                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1445                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1446                 </fields>
1447                 <links>
1448                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1449                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1450                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1451                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1452                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1453                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1454                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1455                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1456                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1457                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1458                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1459                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1460                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1461             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1466                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1467                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1468                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1469             </actions>
1470         </permacrud>
1471         </class>
1472
1473     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1474         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1475             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1476             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1477             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1478         </fields>
1479         <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488     </class>
1489
1490     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1492             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1493             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1494             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1495             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1496             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1497             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1498             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1499         </fields>
1500         <links>
1501             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1502         </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1506                 <retrieve/>
1507                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1508                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1509             </actions>
1510         </permacrud>
1511     </class>
1512
1513     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1514         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1515             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1516             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1517             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1518             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1519             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1520         </fields>
1521         <links>
1522             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1523             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1524         </links>
1525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1526             <actions>
1527                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1528                     <context link="matchpoint" field="org_unit"/>
1529                 </create>
1530                 <retrieve/>
1531                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1532                     <context link="matchpoint" field="org_unit"/>
1533                 </update>
1534                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1535                     <context link="matchpoint" field="org_unit"/>
1536                 </delete>
1537             </actions>
1538         </permacrud>
1539     </class>
1540
1541     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1542         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1543             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1544             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1545             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1546         </fields>
1547         <links>
1548             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1549             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1550         </links>
1551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1552             <actions>
1553                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1554                     <context link="limit_set" field="owning_lib"/>
1555                 </create>
1556                 <retrieve/>
1557                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1558                     <context link="limit_set" field="owning_lib"/>
1559                 </update>
1560                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1561                     <context link="limit_set" field="owning_lib"/>
1562                 </delete>
1563             </actions>
1564         </permacrud>
1565     </class>
1566
1567     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1568         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1569             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1570             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1571             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1572             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1573         </fields>
1574         <links>
1575             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1576             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1577         </links>
1578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1579             <actions>
1580                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1581                     <context link="limit_set" field="owning_lib"/>
1582                 </create>
1583                 <retrieve/>
1584                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1585                     <context link="limit_set" field="owning_lib"/>
1586                 </update>
1587                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1588                     <context link="limit_set" field="owning_lib"/>
1589                 </delete>
1590             </actions>
1591         </permacrud>
1592     </class>
1593
1594         <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">
1595                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1596                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1597                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1598                 </fields>
1599                 <links/>
1600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601             <actions>
1602                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1603                 <retrieve/>
1604                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1605                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1606             </actions>
1607         </permacrud>
1608         </class>
1609
1610         <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">
1611                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1612                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1614                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1615                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1616                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1617                 </fields>
1618                 <links>
1619                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1620                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1621                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1622                 </links>
1623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1624             <actions>
1625                 <create permission="ADMIN_SURVEY">
1626                     <context link="survey" field="owner"/>
1627                 </create>
1628                 <retrieve/>
1629                 <update permission="ADMIN_SURVEY">
1630                     <context link="survey" field="owner"/>
1631                 </update>
1632                 <delete permission="ADMIN_SURVEY">
1633                     <context link="survey" field="owner"/>
1634                 </delete>
1635             </actions>
1636         </permacrud>
1637         </class>
1638         <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">
1639                 <fields oils_persist:primary="id" oils_persist:sequence="">
1640                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1641                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1642                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1643                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1644                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1645                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1646                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1647                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1648                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1649                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1650                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1651                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1652                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1653                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1654                 </fields>
1655                 <links>
1656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1657                 </links>
1658         </class>
1659         <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">
1660                 <fields oils_persist:primary="id" oils_persist:sequence="">
1661                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1662                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1663                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1664                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1665                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1666                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1667                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1668                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1669                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1670                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1671                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1672                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1673                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1674                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1675                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1676                 </fields>
1677                 <links>
1678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1679                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1680                 </links>
1681         </class>
1682         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1683                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1684                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1685                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1686                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1687                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1688                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1689                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1690                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1691                 </fields>
1692                 <links>
1693                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1695                 </links>
1696         </class>
1697         <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">
1698                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1699                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1700                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1701                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1702                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1703                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1704                 </fields>
1705                 <links>
1706                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1707                 </links>
1708         </class>
1709         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1710                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1711                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1712                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1714                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1715                 </fields>
1716                 <links>
1717                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1718                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1719                 </links>
1720         </class>
1721         <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">
1722                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1723                         <field name="field" reporter:datatype="link"/>
1724                         <field name="id" reporter:datatype="id" />
1725                         <field name="source" reporter:datatype="link"/>
1726                         <field name="value" reporter:datatype="text"/>
1727                 </fields>
1728                 <links>
1729                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1730                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1731                 </links>
1732         </class>
1733         <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">
1734                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1735                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1736                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1737                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1738                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1739                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1740                 </fields>
1741                 <links>
1742                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1743                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1744                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1745                 </links>
1746         </class>
1747         <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">
1748                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1749                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1750                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1751                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1752                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1753                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1754                 </fields>
1755                 <links>
1756                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1757                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1758                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1759                 </links>
1760         </class>
1761         <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">
1762                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1763                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1764                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1765                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1766                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1767                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1768                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1769                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1770                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1771                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1772                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1773                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1774                 </fields>
1775                 <links>
1776                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1777                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1778                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1779                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1780                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1782                 </links>
1783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1784             <actions>
1785                 <create permission="TRANSIT_COPY" context_field="owner">
1786                     <context link="target_copy" field="circ_lib"/>
1787                 </create>
1788                 <retrieve/>
1789                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1790                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1791             </actions>
1792         </permacrud>
1793         </class>
1794         <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">
1795                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1796                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1797                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1798                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1799                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1800                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1801                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1802                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1803                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1804                 </fields>
1805                 <links>
1806                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1807                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1808                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1809                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1810                 </links>
1811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1812             <actions>
1813                 <create permission="ADMIN_SURVEY">
1814                     <context link="survey" field="owner"/>
1815                 </create>
1816                 <retrieve/>
1817                 <update permission="ADMIN_SURVEY">
1818                     <context link="survey" field="owner"/>
1819                 </update>
1820                 <delete permission="ADMIN_SURVEY">
1821                     <context link="survey" field="owner"/>
1822                 </delete>
1823             </actions>
1824         </permacrud>
1825         </class>
1826         <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">
1827                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1828                         <field name="bucket" />
1829                         <field name="id" reporter:datatype="id" />
1830                         <field name="target_copy" reporter:datatype="link"/>
1831                         <field name="create_time" reporter:datatype="timestamp" />
1832                         <field name="pos" reporter:datatype="int" />
1833                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1834                 </fields>
1835                 <links>
1836                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1837                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1838             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1839                 </links>
1840         </class>
1841         <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">
1842                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1843                         <field name="id" reporter:datatype="id" />
1844                         <field name="item" reporter:datatype="link"/>
1845                         <field name="note" reporter:datatype="text" />
1846                 </fields>
1847                 <links>
1848                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1849                 </links>
1850         </class>
1851
1852         <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">
1853                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1854                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1855                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1856                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1857                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1858                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1859                 </fields>
1860                 <links>
1861                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1862                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1863                 </links>
1864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1865                         <actions>
1866                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1867                                 <retrieve/>
1868                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1869                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1870                         </actions>
1871                 </permacrud>
1872         </class>
1873
1874         <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">
1875                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1876                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1877                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1878                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1879                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1880                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1881                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1882                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1883                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1884                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1885                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1886                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1887                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1888                 </fields>
1889                 <links>
1890                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1891                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1892                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1893                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1894                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1895                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1896                 </links>
1897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1898                         <actions>
1899                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1900                                 <retrieve/>
1901                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1902                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1903                         </actions>
1904                 </permacrud>
1905         </class>
1906
1907         <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">
1908                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1909                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1910                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1911                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1912                 </fields>
1913                 <links>
1914                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1915                 </links>
1916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1917                         <actions>
1918                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1919                                 <retrieve/>
1920                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1921                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1922                         </actions>
1923                 </permacrud>
1924         </class>
1925
1926         <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">
1927                 <fields oils_persist:primary="code">
1928                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1929                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1930                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1931                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1932                 </fields>
1933                 <links>
1934                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1935                 </links>
1936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1937                         <actions>
1938                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1939                                 <retrieve/>
1940                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1941                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1942                         </actions>
1943                 </permacrud>
1944         </class>
1945
1946         <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">
1947                 <fields oils_persist:primary="code">
1948                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1949                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1950                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1951                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1952                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1953                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1954                 </fields>
1955                 <links>
1956                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1957                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1958                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1959                 </links>
1960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1961                         <actions>
1962                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1963                                 <retrieve/>
1964                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1965                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1966                         </actions>
1967                 </permacrud>
1968         </class>
1969
1970     <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">
1971         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1972             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1973             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1974             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1975         </fields>
1976         <links>
1977             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1978             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1979         </links>
1980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1981             <actions>
1982                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1983                 <retrieve/>
1984                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1985                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1986             </actions>
1987         </permacrud>
1988     </class>
1989
1990         <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">
1991                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1992                         <field name="active" reporter:datatype="bool"/>
1993                         <field name="create_date" reporter:datatype="timestamp"/>
1994                         <field name="creator" />
1995                         <field name="deleted" reporter:datatype="bool"/>
1996                         <field name="edit_date" reporter:datatype="timestamp"/>
1997                         <field name="editor" />
1998                         <field name="id" reporter:datatype="id" />
1999                         <field name="last_xact_id" />
2000                         <field name="marc" />
2001                         <field name="source" />
2002                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2003                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2004                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2005                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2006                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2007                 </fields>
2008                 <links>
2009                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2010                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2011                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2012                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2013                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2014                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2015                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2016                 </links>
2017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2018                         <actions>
2019                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2020                                 <retrieve/>
2021                                 <update permission="UPDATE_MARC" global_required="true"/>
2022                                 <delete permission="UPDATE_MARC" global_required="true"/>
2023                         </actions>
2024                 </permacrud>
2025         </class>
2026         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2028                         <field name="char_encoding" />
2029                         <field name="id" />
2030                         <field name="record" />
2031                         <field name="record_status" />
2032                         <field name="thesaurus" />
2033                 </fields>
2034                 <links>
2035                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2036                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2037                 </links>
2038         </class>
2039         <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">
2040                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2041                         <field name="id" reporter:datatype="id" />
2042                         <field name="bib" reporter:datatype="link" />
2043                         <field name="authority" reporter:datatype="link" />
2044                 </fields>
2045                 <links>
2046                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2047                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2048                 </links>
2049         </class>
2050         <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">
2051                 <fields oils_persist:primary="code" oils_persist:sequence="">
2052                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2053                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2054                 </fields>
2055                 <links/>
2056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2057             <actions>
2058                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2059                 <retrieve/>
2060                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2061                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2062             </actions>
2063         </permacrud>
2064         </class>
2065         <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">
2066                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2067                         <field name="accepting_usr" />
2068                         <field name="amount" reporter:datatype="money" />
2069                         <field name="amount_collected" reporter:datatype="money" />
2070                         <field name="approval_code" reporter:datatype="text"/>
2071                         <field name="cash_drawer" reporter:datatype="link"/>
2072                         <field name="cc_first_name" reporter:datatype="text"/>
2073                         <field name="cc_last_name" reporter:datatype="text"/>
2074                         <field name="cc_number" reporter:datatype="text"/>
2075                         <field name="cc_order_number" reporter:datatype="text"/>
2076                         <field name="cc_type" reporter:datatype="text"/>
2077                         <field name="cc_processor" reporter:datatype="text"/>
2078                         <field name="expire_month" reporter:datatype="int" />
2079                         <field name="expire_year" reporter:datatype="int" />
2080                         <field name="id" reporter:datatype="id" />
2081                         <field name="note" reporter:datatype="text"/>
2082                         <field name="payment_ts" reporter:datatype="timestamp"/>
2083                         <field name="xact" reporter:datatype="link"/>
2084                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2085                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2086                 </fields>
2087                 <links>
2088                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2089                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2090                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2091                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2092                 </links>
2093         </class>
2094         <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">
2095                 <fields oils_persist:primary="name">
2096                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2097                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2098                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2099                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2100                 </fields>
2101                 <links/>
2102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2103             <actions>
2104                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2105                 <retrieve/>
2106                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2107                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2108             </actions>
2109         </permacrud>
2110         </class>
2111
2112         <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">
2113                 <fields oils_persist:primary="alias">
2114                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2115                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2116                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2117                 </fields>
2118                 <links>
2119                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2120                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2121                 </links>
2122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2123             <actions>
2124                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2125                 <retrieve/>
2126                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2127                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2128             </actions>
2129         </permacrud>
2130         </class>
2131
2132         <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">
2133                 <fields oils_persist:primary="name">
2134                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2135                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2136                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2137                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2138                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2139                 </fields>
2140                 <links>
2141                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2142                 </links>
2143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144             <actions>
2145                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2146                 <retrieve/>
2147                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2148                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2149             </actions>
2150         </permacrud>
2151         </class>
2152
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2155                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2156                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2157                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2158                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2159                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2160                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2161                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2162                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2163                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2164                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2165                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2166                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2167                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2168                 </fields>
2169                 <links>
2170                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2171                 </links>
2172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2173             <actions>
2174                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2175                 <retrieve/>
2176                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2177                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2178             </actions>
2179         </permacrud>
2180         </class>
2181         <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">
2182                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2183                         <field name="id" reporter:datatype="id" />
2184                         <field name="name" reporter:datatype="text"/>
2185                         <field name="xpath" reporter:datatype="text"/>
2186                         <field name="format" reporter:datatype="link"/>
2187                         <field name="first_word" reporter:datatype="bool" />
2188                 </fields>
2189                 <links/>
2190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2191             <actions>
2192                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2193                 <retrieve/>
2194                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2195                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2196             </actions>
2197         </permacrud>
2198         </class>
2199         <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">
2200                 <fields oils_persist:primary="code" oils_persist:sequence="">
2201                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2202                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2203                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2204                 </fields>
2205                 <links/>
2206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2207             <actions>
2208                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2209                 <retrieve/>
2210                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2211                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2212             </actions>
2213         </permacrud>
2214         </class>
2215         <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">
2216                 <fields oils_persist:primary="code" oils_persist:sequence="">
2217                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2218                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2219                 </fields>
2220                 <links/>
2221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2222             <actions>
2223                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2224                 <retrieve/>
2225                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2226                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2227             </actions>
2228         </permacrud>
2229         </class>
2230     <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">
2231         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2232             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2233             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2234             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2235             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2236         </fields>
2237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2238             <actions>
2239                 <retrieve/>
2240             </actions>
2241         </permacrud>
2242     </class>
2243         <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">
2244                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2245                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2246                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2247                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2248                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2249                 </fields>
2250                 <links>
2251                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2252                 </links>
2253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2254             <actions>
2255                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2256                 <retrieve/>
2257                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2258                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2259             </actions>
2260         </permacrud>
2261         </class>
2262         <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">
2263                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2264                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2266                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2267                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2268                 </fields>
2269                 <links>
2270                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2271                 </links>
2272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273             <actions>
2274                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2275                 <retrieve/>
2276                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2277                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2278             </actions>
2279         </permacrud>
2280         </class>
2281         <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">
2282                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2283                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2284                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2286                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2287                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2288                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2289                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2290                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2291                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2292                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2293                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2294                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2295                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2296                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2297                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2298                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2299                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2300                 </fields>
2301                 <links>
2302                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2305                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2306                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2307                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2308                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2309                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2310                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2311                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2312                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2313                 </links>
2314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2315             <actions>
2316                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2317                 <retrieve/>
2318                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2319                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2325                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2326                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2327                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2328                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2329                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2330                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2332                 </fields>
2333                 <links>
2334                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2335                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2336         </links>
2337         </class>
2338         <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">
2339                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2340                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2341                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2342                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2343                 </fields>
2344                 <links>
2345                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2346                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2347                 </links>
2348         </class>
2349         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2350                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2351                         <field name="id" reporter:datatype="id" />
2352                         <field name="value" oils_persist:i18n="true" />
2353                 </fields>
2354                 <links/>
2355         </class>
2356         <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">
2357                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2358                         <field name="balance_owed" reporter:datatype="money" />
2359                         <field name="total_owed" reporter:datatype="money" />
2360                         <field name="total_paid" reporter:datatype="money" />
2361                         <field name="usr" reporter:datatype="link"/>
2362                 </fields>
2363                 <links>
2364                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2365         </links>
2366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2367             <actions>
2368                 <retrieve permission="VIEW_USER">
2369                     <context link="usr" field="home_ou"/>
2370                 </retrieve>
2371             </actions>
2372         </permacrud>
2373         </class>
2374         <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">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2376                         <field name="collector" />
2377                         <field name="enter_time" reporter:datatype="timestamp"/>
2378                         <field name="id" reporter:datatype="id" />
2379                         <field name="location" reporter:datatype="link"/>
2380                         <field name="usr" reporter:datatype="link"/>
2381                 </fields>
2382                 <links>
2383                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2384                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2385                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2386                 </links>
2387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2388             <actions>
2389                 <create permission="money.collections_tracker.create" context_field="location"/>
2390                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2391                 <delete permission="money.collections_tracker.create" context_field="location"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2397                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2398                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2399                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2400                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2401                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2402                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2403                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2404                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2405                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2406                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2407                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2408                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2409                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2410                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2411                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2412                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2413                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2414                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2415                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2416                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2417                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2418                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2419                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2420                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2421                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2422                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2423                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2424                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2425                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2426                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2427                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2428                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2429                 </fields>
2430                 <links>
2431                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2432                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2433                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2434                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2435                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2436                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2437                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2438                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2439                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2440                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2441                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2442                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2443                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2444                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2445                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2446                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2447                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2448                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2449                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2450                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2451                 </links>
2452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2453             <actions>
2454                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2455                 <retrieve/>
2456                 <update permission="UPDATE_MARC" global_required="true"/>
2457             </actions>
2458         </permacrud>
2459         </class>
2460         <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">
2461                 <fields oils_persist:primary="id">
2462                         <field name="dow_0_close" />
2463                         <field name="dow_0_open" />
2464                         <field name="dow_1_close" />
2465                         <field name="dow_1_open" />
2466                         <field name="dow_2_close" />
2467                         <field name="dow_2_open" />
2468                         <field name="dow_3_close" />
2469                         <field name="dow_3_open" />
2470                         <field name="dow_4_close" />
2471                         <field name="dow_4_open" />
2472                         <field name="dow_5_close" />
2473                         <field name="dow_5_open" />
2474                         <field name="dow_6_close" />
2475                         <field name="dow_6_open" />
2476                         <field name="id" reporter:datatype="id" />
2477                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2478                 </fields>
2479                 <links>
2480                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2481                 </links>
2482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2483             <actions>
2484                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2485                 <retrieve/>
2486                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2487                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2488             </actions>
2489         </permacrud>
2490         </class>
2491         <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">
2492                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2493                         <field name="id" reporter:datatype="id" />
2494                         <field name="record" reporter:datatype="link"/>
2495                         <field name="label" reporter:datatype="text"/>
2496                         <field name="label_sortkey" reporter:datatype="text"/>
2497                 </fields>
2498                 <links>
2499                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2500                 </links>
2501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2502             <actions>
2503                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2504                 <retrieve/>
2505                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2506                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2507             </actions>
2508         </permacrud>
2509         </class>
2510         <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">
2511                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2512                         <field name="id" reporter:datatype="id" />
2513                         <field name="target_copy" reporter:datatype="link" />
2514                         <field name="part" reporter:datatype="link"/>
2515                 </fields>
2516                 <links>
2517                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2518                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2519                 </links>
2520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2521             <actions>
2522                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2523                 <retrieve/>
2524                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2525                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2526             </actions>
2527         </permacrud>
2528         </class>
2529         <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">
2530                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2531                         <field name="close_end" reporter:datatype="timestamp" />
2532                         <field name="close_start" reporter:datatype="timestamp" />
2533                         <field name="id" reporter:datatype="id" />
2534                         <field name="org_unit" reporter:datatype="org_unit"/>
2535                         <field name="reason" reporter:datatype="text"/>
2536                 </fields>
2537                 <links>
2538                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2539                 </links>
2540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2541             <actions>
2542                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2543                 <retrieve/>
2544                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2545                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2546             </actions>
2547         </permacrud>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2551                         <field name="extended" reporter:datatype="interval"/>
2552                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2553                         <field name="max_renewals" reporter:datatype="int" />
2554                         <field name="name" reporter:datatype="text"/>
2555                         <field name="normal" reporter:datatype="interval"/>
2556                         <field name="shrt" reporter:datatype="interval"/>
2557                 </fields>
2558                 <links>
2559                 </links>
2560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2561             <actions>
2562                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2563                 <retrieve/>
2564                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2565                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2566             </actions>
2567         </permacrud>
2568         </class>
2569
2570         <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">
2571                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2572                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2573                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2574             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2575                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2576             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2577                 </fields>
2578                 <links>
2579             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2580                 </links>
2581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2582             <actions>
2583                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2584                 <retrieve/>
2585                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2586                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2587             </actions>
2588                 </permacrud>
2589         </class>
2590
2591         <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">
2592                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2593                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2594                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2595                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2596             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2597                 </fields>
2598                 <links>
2599                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2600                 </links>
2601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2602             <actions>
2603                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2604                 <retrieve/>
2605                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2606                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2607             </actions>
2608                 </permacrud>
2609         </class>
2610
2611         <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">
2612                 <fields oils_persist:primary="id" oils_persist:sequence="">
2613                         <field name="balance_owed" reporter:datatype="money"/>
2614                         <field name="id" reporter:datatype="id" />
2615                         <field name="last_billing_note" reporter:datatype="text"/>
2616                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2617                         <field name="last_billing_type" reporter:datatype="text"/>
2618                         <field name="last_payment_note" reporter:datatype="text"/>
2619                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2620                         <field name="last_payment_type" reporter:datatype="text"/>
2621                         <field name="total_owed" reporter:datatype="money"/>
2622                         <field name="total_paid" reporter:datatype="money"/>
2623                         <field name="usr" reporter:datatype="link"/>
2624                         <field name="xact_finish" reporter:datatype="timestamp" />
2625                         <field name="xact_start" reporter:datatype="timestamp" />
2626                         <field name="xact_type" reporter:datatype="text"/>
2627                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2628                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2629                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2630                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2631                         <field name="billing_location" reporter:datatype="link"/>
2632                 </fields>
2633                 <links>
2634                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2635                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2636                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2637                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2638                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2639                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2640                 </links>
2641         </class>
2642         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2643                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2644                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2645                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2646                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2647                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2648                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2649                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2650                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2651                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2652                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2653                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2654                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2655                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2656                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2657                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2658                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2659                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2660                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2661                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2662                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2663                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2664                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2665                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2666                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2667                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2668                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2669                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2670                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2671                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2672                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2673                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2674                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2675                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2676                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2677                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2678                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2679                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2680                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2681                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2682                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2683                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2684                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2685                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2686                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2687                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2688                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2689                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2690                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2691                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2692                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2693                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2694                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2695                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2697                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2702                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2703                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2704                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2705                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2706                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2707                 </fields>
2708                 <links>
2709                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2710                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2711                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2712                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2713                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2714                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2715                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2716                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2717                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2718                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2719                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2720                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2721                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2722                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2723                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2724                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2725                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2726                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2727                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2728                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2729                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2730                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2731                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2732                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2733                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2734                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2735                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2736                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2737                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2738                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2739                 </links>
2740         </class>
2741         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2743                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2744                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2745                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2746                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2747                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2748                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2749                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2750                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2751         </fields>
2752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2753                         <actions>
2754                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2755                                 <retrieve/>
2756                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2757                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2758                         </actions>
2759                 </permacrud>
2760         </class>
2761         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
2762                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2763                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2764                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2765                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2766                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2767         </fields>
2768         <links>
2769                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2770                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2771                 </links>
2772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773                         <actions>
2774                                 <retrieve permission="RUN_REPORTS">
2775                                         <context link="usr" field="home_ou" />
2776                                 </retrieve>
2777                         </actions>
2778                 </permacrud>
2779         </class>
2780         <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">
2781                 <fields oils_persist:primary="name">
2782                         <field name="name" reporter:datatype="text"/>
2783                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2784                 </fields>
2785                 <links/>
2786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2787                         <actions>
2788                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2789                                 <retrieve/>
2790                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2791                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2792                         </actions>
2793                 </permacrud>
2794         </class>
2795         <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">
2796                 <fields oils_persist:primary="name">
2797                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2798                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2799                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2800                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2801                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2802                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2803                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2804                 </fields>
2805                 <links>
2806                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2807                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2808                 </links>
2809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2810                         <actions>
2811                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2812                                 <retrieve/>
2813                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2814                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2815                         </actions>
2816                 </permacrud>
2817         </class>
2818         <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">
2819                 <fields oils_persist:primary="name">
2820                         <field name="name" reporter:datatype="text"/>
2821                         <field name="label" reporter:datatype="text"/>
2822                         <field name="description" reporter:datatype="text"/>
2823                         <field name="datatype" reporter:datatype="text"/>
2824                         <field name="view_perm" reporter:datatype="link"/>
2825                         <field name="update_perm" reporter:datatype="link"/>
2826                         <field name="fm_class" reporter:datatype="text"/>
2827                         <field name="grp" reporter:datatype="link"/>
2828                 </fields>
2829                 <links>
2830                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2831                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2832                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2833                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2834                 </links>
2835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2836                         <actions>
2837                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2838                                 <retrieve/>
2839                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2840                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2841                         </actions>
2842                 </permacrud>
2843         </class>
2844         <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">
2845                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2846                         <field name="id" />
2847                         <field name="name"  reporter:datatype="text"/>
2848                         <field name="org_unit" reporter:datatype="org_unit"/>
2849                         <field name="value"  reporter:datatype="text"/>
2850                 </fields>
2851                 <links>
2852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2853                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2854                 </links>
2855         </class>
2856         <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">
2857                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2858                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2859                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2860                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2861                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2862                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2863                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2864                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2865                 </fields>
2866                 <links>
2867                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2868                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2869                 </links>
2870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2871             <actions>
2872                 <create permission="CREATE_COPY_NOTE">
2873                     <context link="owning_copy" field="circ_lib"/>
2874                 </create>
2875                 <retrieve permission="VIEW_COPY_NOTES">
2876                     <context link="owning_copy" field="circ_lib"/>
2877                 </retrieve>
2878                 <update permission="UPDATE_COPY_NOTE">
2879                     <context link="owning_copy" field="circ_lib"/>
2880                 </update>
2881                 <delete permission="DELETE_COPY_NOTE">
2882                     <context link="owning_copy" field="circ_lib"/>
2883                 </delete>
2884             </actions>
2885         </permacrud>
2886         </class>
2887         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2889                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2890                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2891                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2892                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2893                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2894                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2895                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2896                 </fields>
2897                 <links>
2898                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2899                 </links>
2900         </class>
2901         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2902                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2903                         <field name="fingerprint"  reporter:datatype="text"/>
2904                         <field name="id" reporter:datatype="id" />
2905                         <field name="master_record" reporter:datatype="link"/>
2906                         <field name="mods"  reporter:datatype="text"/>
2907                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2908                 </fields>
2909                 <links>
2910                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2911                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2912                 </links>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2916                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2917                         <field name="name"  reporter:datatype="text"/>
2918                 </fields>
2919                 <links/>
2920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2921             <actions>
2922                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2923                 <retrieve/>
2924                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2925                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2926             </actions>
2927         </permacrud>
2928         </class>
2929         <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">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2931                         <field name="code"  reporter:datatype="text"/>
2932                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2933                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2934                 </fields>
2935                 <links/>
2936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2937             <actions>
2938                 <create permission="CREATE_PERM" global_required="true"/>
2939                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2940                 <update permission="UPDATE_PERM" global_required="true"/>
2941                 <delete permission="DELETE_PERM" global_required="true"/>
2942             </actions>
2943         </permacrud>
2944         </class>
2945         <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">
2946                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2947                         <field name="id" reporter:datatype="id" />
2948                         <field name="metarecord" reporter:datatype="link"/>
2949                         <field name="source" reporter:datatype="link"/>
2950                 </fields>
2951                 <links>
2952                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2953                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2954                 </links>
2955         </class>
2956         <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">
2957                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2958                         <field name="id" reporter:datatype="id" />
2959                         <field name="field" reporter:datatype="link"/>
2960                         <field name="source" reporter:datatype="link"/>
2961                         <field name="value"  reporter:datatype="text"/>
2962                 </fields>
2963                 <links>
2964                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2965                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2966                 </links>
2967         </class>
2968         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
2969                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
2970                         <field name="id" reporter:datatype="id" />
2971                         <field name="value" reporter:datatype="text"/>
2972                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2973                 </fields>
2974                 <links>
2975                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
2976                 </links>
2977         </class>
2978         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
2979                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
2980                         <field name="id" reporter:datatype="id" />
2981                         <field name="entry" reporter:datatype="link"/>
2982                         <field name="def" reporter:datatype="link"/>
2983                         <field name="source" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
2987                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
2988                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2989                 </links>
2990         </class>
2991         <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">
2992                 <oils_persist:source_definition>
2993                         SELECT * FROM metabib.author_field_entry
2994                                                 UNION ALL
2995                         SELECT * FROM metabib.keyword_field_entry
2996                                                 UNION ALL
2997                         SELECT * FROM metabib.identifier_field_entry
2998                                                 UNION ALL
2999                         SELECT * FROM metabib.title_field_entry
3000                                                 UNION ALL
3001                         SELECT * FROM metabib.subject_field_entry
3002                                                 UNION ALL
3003                         SELECT * FROM metabib.series_field_entry
3004                 </oils_persist:source_definition>
3005                 <fields>
3006                         <field name="field" reporter:datatype="link"/>
3007                         <field name="id" reporter:datatype="id" />
3008                         <field name="source" reporter:datatype="link"/>
3009                         <field name="value"  reporter:datatype="text"/>
3010                 </fields>
3011                 <links>
3012                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3013                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3014                 </links>
3015         </class>
3016         <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">
3017                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3018                         <field name="field" reporter:datatype="link"/>
3019                         <field name="id" reporter:datatype="id" />
3020                         <field name="source" reporter:datatype="link"/>
3021                         <field name="value"  reporter:datatype="text"/>
3022                 </fields>
3023                 <links>
3024                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3025                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3026                 </links>
3027         </class>
3028         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3029                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3030                         <field name="accepting_usr" reporter:datatype="link"/>
3031                         <field name="amount" reporter:datatype="money" />
3032                         <field name="amount_collected" reporter:datatype="money" />
3033                         <field name="cash_drawer" reporter:datatype="link"/>
3034                         <field name="id" reporter:datatype="id" />
3035                         <field name="note"  reporter:datatype="text"/>
3036                         <field name="payment_ts" reporter:datatype="timestamp"/>
3037                         <field name="xact" reporter:datatype="link"/>
3038                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3039                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3040                 </fields>
3041                 <links>
3042                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3043                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3044                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3045                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3046                 </links>
3047         </class>
3048         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3050                         <field name="accepting_usr" reporter:datatype="link"/>
3051                         <field name="amount" reporter:datatype="money" />
3052                         <field name="amount_collected" reporter:datatype="money" />
3053                         <field name="id" reporter:datatype="id" />
3054                         <field name="note"  reporter:datatype="text"/>
3055                         <field name="payment_ts" reporter:datatype="timestamp"/>
3056                         <field name="xact" reporter:datatype="link"/>
3057                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3058                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3059                 </fields>
3060                 <links>
3061                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3062                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3063                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3064                 </links>
3065         </class>
3066         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3067                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3068                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3069                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3070                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3071                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3072                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3073                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3074                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3075                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3076                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3077                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3078                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3079                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3080                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3081                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3082                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3083                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3084                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3085                 </fields>
3086                 <links>
3087                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3088                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3089                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3090                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3091                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3092                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3093                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3094                 </links>
3095         </class>
3096
3097         <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">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3099                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3100                         <field name="name"  reporter:datatype="text"/>
3101                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3102                         <field name="block_list" reporter:datatype="text"/>
3103                         <field name="staff_alert" reporter:datatype="bool"/>
3104                         <field name="org_depth" reporter:datatype="int"/>
3105                 </fields>
3106                 <links/>
3107         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3108             <actions>
3109                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3110                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3111                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3112                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3113             </actions>
3114         </permacrud>
3115         </class>
3116         <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">
3117                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3118                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3119                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3120                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3121                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3122                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3123                 </fields>
3124                 <links>
3125                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3126                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3127                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3128         </links>
3129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3130             <actions>
3131                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3132                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3133                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3134                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3135             </actions>
3136         </permacrud>
3137         </class>
3138         <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">
3139                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3140                         <field name="holdable" reporter:datatype="bool"/>
3141                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3142                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3143                         <field name="opac_visible" reporter:datatype="bool"/>
3144             <field name="copy_active" reporter:datatype="bool"/>
3145             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3146                 </fields>
3147                 <links/>
3148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3149             <actions>
3150                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3151                 <retrieve/>
3152                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3153                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3154             </actions>
3155         </permacrud>
3156         </class>
3157         <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">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3159                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3160                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3161                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3162                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3163                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3164                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3165                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3166                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3167                 </fields>
3168                 <links>
3169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3170                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3171                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3172                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3173                 </links>
3174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3175                         <actions>
3176                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3177                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3178                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3179                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3180                         </actions>
3181                 </permacrud>
3182         </class>
3183         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3185                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3186                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3187                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3188                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3189                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3190                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3191                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3192                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3193                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3194                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3195                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3196                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3197                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3198                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3199                 </fields>
3200                 <links>
3201                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3202                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3203                 </links>
3204         </class>
3205         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3206                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3207                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3208                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3209                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3210                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3211                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3212                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3213                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3214                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3215                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3216                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3217                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3218                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3219                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3220                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3221                 </fields>
3222                 <links>
3223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3224                 </links>
3225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3226                         <actions>
3227                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3228                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3229                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3230                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3231                         </actions>
3232                 </permacrud>
3233         </class>
3234
3235
3236         <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">
3237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3238                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3239                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3240                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3241                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3242                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3243                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3244                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3245                 </fields>
3246                 <links>
3247                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3248                 </links>
3249         </class>
3250
3251         <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">
3252                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3253                         <field name="call_number" />
3254                         <field name="create_date" reporter:datatype="timestamp"/>
3255                         <field name="creator" reporter:datatype="link"/>
3256                         <field name="id" reporter:datatype="id" />
3257                         <field name="pub" reporter:datatype="bool"/>
3258                         <field name="title"  reporter:datatype="text"/>
3259                         <field name="value"  reporter:datatype="text"/>
3260                 </fields>
3261                 <links>
3262                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3263                 </links>
3264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3265             <actions>
3266                 <create permission="CREATE_VOLUME_NOTE">
3267                     <context link="call_number" field="owning_lib"/>
3268                 </create>
3269                 <retrieve permission="VIEW_VOLUME_NOTES">
3270                     <context link="call_number" field="owning_lib"/>
3271                 </retrieve>
3272                 <update permission="UPDATE_VOLUME_NOTE">
3273                     <context link="call_number" field="owning_lib"/>
3274                 </update>
3275                 <delete permission="DELETE_VOLUME_NOTE">
3276                     <context link="call_number" field="owning_lib"/>
3277                 </delete>
3278             </actions>
3279         </permacrud>
3280         </class>
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3283                         <field name="create_date" reporter:datatype="timestamp"/>
3284                         <field name="creator" reporter:datatype="link"/>
3285                         <field name="edit_date" reporter:datatype="timestamp"/>
3286                         <field name="editor" reporter:datatype="link"/>
3287                         <field name="id" reporter:datatype="id" />
3288                         <field name="record" reporter:datatype="link"/>
3289                         <field name="value" reporter:datatype="text"/>
3290                 </fields>
3291                 <links>
3292                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3293                 </links>
3294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3295             <actions>
3296                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3297                 <retrieve/>
3298                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3299                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3300             </actions>
3301         </permacrud>
3302         </class>
3303         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3304         <oils_persist:source_definition>
3305 SELECT  usr,
3306         SUM(
3307             CASE
3308                 WHEN (
3309                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3310                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3311                 ) THEN 1
3312                 ELSE 0
3313             END
3314         ) AS out,
3315
3316         SUM(
3317             CASE
3318                 WHEN (
3319                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3320                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3321                 ) THEN 1
3322                 ELSE 0
3323             END
3324         ) AS overdue,
3325
3326         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3327         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3328         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3329   FROM  action.circulation
3330   WHERE checkin_time IS NULL
3331   GROUP BY 1
3332         </oils_persist:source_definition>
3333         <fields oils_persist:primary="usr">
3334             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3335             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3336             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3337             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3338             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3339             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3340         </fields>
3341         <links>
3342             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3343         </links>
3344         </class>
3345         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3346         <oils_persist:source_definition>
3347 SELECT  usr,
3348         ARRAY_TO_STRING(ARRAY_ACCUM(
3349             CASE
3350                 WHEN (
3351                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3352                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3353                 ) THEN id
3354                 ELSE 0
3355             END
3356         ),',') AS out,
3357
3358         ARRAY_TO_STRING(ARRAY_ACCUM(
3359             CASE
3360                 WHEN (
3361                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3362                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3363                 ) THEN id
3364                 ELSE 0
3365             END
3366         ),',') AS overdue,
3367
3368         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3369         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3370         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3371   FROM  action.circulation
3372   WHERE checkin_time IS NULL
3373   GROUP BY 1
3374         </oils_persist:source_definition>
3375         <fields oils_persist:primary="usr">
3376             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3377             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3378             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3379             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3380             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3381             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3382         </fields>
3383         <links>
3384             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3385         </links>
3386         </class>
3387         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3388                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3389                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3390                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3391                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3392                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3393                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3394                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3395                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3396                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3397                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3398                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3399                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3400                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3401                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3402                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3403                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3404                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3405                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3406                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3407                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3408                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3409                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3410                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3411                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3412                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3413                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3414                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3415                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3416                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3417                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3418                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3419                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3421                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3422                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3423                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3424                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3425                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3426                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3427                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3428                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3429                 </fields>
3430                 <links>
3431                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3432                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3433                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3434                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3435                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3436                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3437                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3438                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3439                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3440                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3441                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3442                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3443                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3444                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3445                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3446                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3447                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3448                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3449                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3450                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3451                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3452                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3453                 </links>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3457                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3458                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3459                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3460                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3461                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3462                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3463                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3464                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3465                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3466                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3467                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3468                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3469                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3470                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3471                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3472                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3473                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3474                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3475                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3476                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3477                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3478                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3479                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3480                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3481                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3482                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3483                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3484                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3485                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3486                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3487                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3488                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3489                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3490                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3491                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3492                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3493                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3494                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3495                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3496                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3497                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3498                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3499                 </fields>
3500                 <links>
3501                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3502                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3503                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3504                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3505                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3506                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3507                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3508                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3509                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3510                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3511                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3512                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3513                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3514                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3515                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3516                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3517                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3518                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3519                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3520                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3521                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3522                 </links>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3526                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3527                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3528                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3529                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3530                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3531                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3532                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3533                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3534                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3535                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3536                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3537                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3538                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3539                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3540                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3541                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3542                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3543                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3544                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3545                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3546                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3547                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3548                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3550                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3551                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3552                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3553                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3554                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3555                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3556                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3557                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3558                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3559                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3560                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3561                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3562                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3563                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3564                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3565                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3566                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3567                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3568                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3569                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3570                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3571                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3572                 </fields>
3573                 <links>
3574                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3575                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3576                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3577                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3578                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3580                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3581                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3582                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3583                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3584                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3585                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3586                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3587                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3588                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3589                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3590                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3591                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3592                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3593                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3594                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3595                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3596                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3597                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3598                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3599                 </links>
3600         </class>
3601
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3604                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3605                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3606                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3607                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3608                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3609                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3610                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3611                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3612                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3613                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3614                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3615                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3616                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3617                 </fields>
3618                 <links>
3619                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3620                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3621                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3622                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3623                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3624                 </links>
3625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3626                         <actions>
3627                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3628                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3629                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3630                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3631                         </actions>
3632                 </permacrud>
3633         </class>
3634
3635         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3636                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3637                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3638                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3639                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3640                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3641                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3642                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3643                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3644                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3645                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3646                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3647                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3648                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3649                 </fields>
3650                 <links>
3651                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3652                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3653                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3654                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3655                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3656                 </links>
3657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3658                         <actions>
3659                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3660                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3661                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3662                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3663                         </actions>
3664                 </permacrud>
3665         </class>
3666         
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3669                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3670                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3671                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3672                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3673                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3674                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3675                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3676                 </fields>
3677                 <links>
3678                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3679                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3680                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3681                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3682                 </links>
3683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3684                         <actions>
3685                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3686                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3687                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3688                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3689                         </actions>
3690                 </permacrud>
3691         </class>
3692         
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3695                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3696                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3697                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3698                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3699                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3701                 </fields>
3702                 <links>
3703                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3704                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3705                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3706                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3707                 </links>
3708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3709                         <actions>
3710                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3711                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3712                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3713                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3714                         </actions>
3715                 </permacrud>
3716         </class>
3717         
3718         <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">
3719                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3720                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3721                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3722                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3723                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3724                 </fields>
3725                 <links>
3726                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3727                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3728                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3729                 </links>
3730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3731                         <actions>
3732                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3733                     <context link="resource" field="owner" />
3734                 </create>
3735                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3736                     <context link="resource" field="owner" />
3737                 </retrieve>
3738                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3739                     <context link="resource" field="owner" />
3740                 </update>
3741                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3742                     <context link="resource" field="owner" />
3743                 </delete>
3744                         </actions>
3745                 </permacrud>
3746         </class>
3747         
3748         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3749                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3750                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3751                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3752                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3753                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3755                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3756                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3757                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3758                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3759                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3760                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3761                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3762                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3763                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3764                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3765                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3766                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3767                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3768                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3769                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3770                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3771                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3772                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3773                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3774                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3775                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3776                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3777                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3778                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3779                 </fields>
3780                 <links>
3781                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3782                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3783                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3784                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3785                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3786                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3787                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3788                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3789                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3790                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3791                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3792                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3793                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3794                 </links>
3795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3796                         <actions>
3797                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3798                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3799                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3800                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3801                         </actions>
3802                 </permacrud>
3803         </class>
3804         
3805         <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">
3806                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3807                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3808                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3809                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3810                 </fields>
3811                 <links>
3812                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3813                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3814                 </links>
3815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3816                         <actions>
3817                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3818                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3819                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3820                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3821                         </actions>
3822                 </permacrud>
3823         </class>
3824
3825         <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">
3826                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3827                         <field name="bucket" reporter:datatype="link"/>
3828                         <field name="id" reporter:datatype="id" />
3829                         <field name="target_call_number" reporter:datatype="link" />
3830                         <field name="create_time" reporter:datatype="timestamp" />
3831                         <field name="pos" reporter:datatype="int" />
3832                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3833                 </fields>
3834                 <links>
3835                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3836                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3837             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3838                 </links>
3839         </class>
3840         <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">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3842                         <field name="id" reporter:datatype="id" />
3843                         <field name="item" reporter:datatype="link"/>
3844                         <field name="note" reporter:datatype="text" />
3845                 </fields>
3846                 <links>
3847                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3848                 </links>
3849         </class>
3850         <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">
3851                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3852                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3853                         <field name="btype" reporter:datatype="text"/>
3854                         <field name="id" reporter:datatype="id" />
3855                         <field name="name" reporter:datatype="text"/>
3856                         <field name="description" reporter:datatype="text"/>
3857                         <field name="owner" reporter:datatype="link"/>
3858                         <field name="pub" reporter:datatype="bool"/>
3859                         <field name="create_time" reporter:datatype="timestamp" />
3860                 </fields>
3861                 <links>
3862                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3863                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3864                 </links>
3865         </class>
3866         <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">
3867                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3868                         <field name="id" reporter:datatype="id" />
3869                         <field name="bucket" reporter:datatype="link"/>
3870                         <field name="note" reporter:datatype="text" />
3871                 </fields>
3872                 <links>
3873                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3874                 </links>
3875         </class>
3876         <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">
3877                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3878                         <field name="hold" reporter:datatype="link"/>
3879                         <field name="id" reporter:datatype="id" />
3880                         <field name="target_copy" reporter:datatype="link"/>
3881                 </fields>
3882                 <links>
3883                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3884                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3885                 </links>
3886         </class>
3887         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3889                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3890                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3891                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3892                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3893                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3894                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3895                 </fields>
3896                 <links>
3897                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3898                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3899                 </links>
3900         </class>
3901         <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">
3902                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3903                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3904                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3905                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3906                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3907                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3908                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3909                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3910                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3911                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3912                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3913                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3914                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
3915                 </fields>
3916                 <links>
3917                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3918                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3919                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3920                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3921                 </links>
3922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3923             <actions>
3924                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3925                 <retrieve/>
3926                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3927                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3928             </actions>
3929         </permacrud>
3930         </class>
3931         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
3933                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3934                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3935                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3936                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
3937             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
3938             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3939                 </fields>
3940                 <links>
3941                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3942                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
3943                 </links>
3944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3945             <actions>
3946                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3947                 <retrieve/>
3948                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3949                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
3950             </actions>
3951         </permacrud>
3952         </class>
3953         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
3954                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
3955                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3956             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
3957             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
3958                 </fields>
3959                 <links>
3960                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
3961                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3962                 </links>
3963         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3964             <actions>
3965                 <create permission="ADMIN_COPY_LOCATION_GROUP">
3966                                         <context link="lgroup" field="owner" />
3967                 </create>
3968                 <retrieve/>
3969                 <update permission="ADMIN_COPY_LOCATION_GROUP">
3970                                         <context link="lgroup" field="owner" />
3971                 </update>
3972                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
3973                                         <context link="lgroup" field="owner" />
3974                 </delete>
3975             </actions>
3976         </permacrud>
3977         </class>
3978
3979     <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">
3980         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3981             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3982             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3983             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3984             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3985         </fields>
3986         <links>
3987             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3988             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3989         </links>
3990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3991             <actions>
3992                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3993                 <retrieve/>
3994                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3995                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3996             </actions>
3997         </permacrud>
3998     </class>
3999
4000         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4001                 <fields>
4002                         <field name="sre_id" oils_persist:virtual="true" />
4003                         <field name="location" oils_persist:virtual="true" />
4004                         <field name="owning_lib" oils_persist:virtual="true" />
4005                         <field name="basic_holdings" oils_persist:virtual="true" />
4006                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4007                         <field name="supplement_holdings" oils_persist:virtual="true" />
4008                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4009                         <field name="index_holdings" oils_persist:virtual="true" />
4010                         <field name="index_holdings_add" oils_persist:virtual="true" />
4011                         <field name="online" oils_persist:virtual="true" />
4012                         <field name="missing" oils_persist:virtual="true" />
4013                         <field name="incomplete" oils_persist:virtual="true" />
4014                 </fields>
4015         </class>
4016
4017         <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">
4018                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4019                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4020                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4021                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4022                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4023                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4024                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4025                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4026                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4027                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4028                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4029                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4030                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4031                 </fields>
4032                 <links>
4033                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4034                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4035                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4036                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4037                 </links>
4038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4039                         <actions>
4040                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4041                                 <retrieve/>
4042                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4043                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4044                         </actions>
4045                 </permacrud>
4046         </class>
4047
4048         <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">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4050                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4051                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4052                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4053                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4054                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4055                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4056                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4057                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4058                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4059                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4060                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4061                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4062                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4063                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4064                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4065                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4066                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4067                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4068                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4069                 </fields>
4070                 <links>
4071                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4072                 </links>
4073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4074                         <actions>
4075                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4076                                         <context link="subscription" field="owning_lib" />
4077                                 </create>
4078                                 <retrieve />
4079                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4080                                         <context link="subscription" field="owning_lib" />
4081                                 </update>
4082                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4083                                         <context link="subscription" field="owning_lib" />
4084                                 </delete>
4085                         </actions>
4086                 </permacrud>
4087         </class>
4088
4089         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4092                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4093                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4094                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4095                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4096                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4097                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4098                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4099                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4100                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4101                 </fields>
4102                 <links>
4103                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4104                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4105                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4106                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4107                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4108                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4109                 </links>
4110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4111                         <actions>
4112                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4113                                 <retrieve />
4114                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4115                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4116                         </actions>
4117                 </permacrud>
4118         </class>
4119
4120         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4121                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4122                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4123                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4124                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4125                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4127                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4128                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4129                 </fields>
4130                 <links>
4131                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4132                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4133                 </links>
4134         </class>
4135
4136         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4137                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4138                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4139                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4140                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4141                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4142                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4143                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4144                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4145                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4146                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4147                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4148                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4149                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4150                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4151                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4152                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4153                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4154                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4155                 </fields>
4156                 <links>
4157                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4158                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4159                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4160                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4161                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4162                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4163                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4164                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4165                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4166                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4167                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4168                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4169                 </links>
4170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4171                         <actions>
4172                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4173                                 <retrieve />
4174                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4175                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4176                         </actions>
4177                 </permacrud>
4178         </class>
4179
4180         <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">
4181                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4182                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4183                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4184                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4185                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4186                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4187                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4188                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4189                 </fields>
4190                 <links>
4191                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4192                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4193                 </links>
4194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4195                         <actions>
4196                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4197                                         <context link="distribution" field="holding_lib" />
4198                                 </create>
4199                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4200                                         <context link="distribution" field="holding_lib" />
4201                                 </retrieve>
4202                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4203                                         <context link="distribution" field="holding_lib" />
4204                                 </update>
4205                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4206                                         <context link="distribution" field="holding_lib" />
4207                                 </delete>
4208                         </actions>
4209                 </permacrud>
4210         </class>
4211
4212         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4214                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4215                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4216                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4217                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4218                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4219                 </fields>
4220                 <links>
4221                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4222                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4223                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4224                 </links>
4225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4226                         <actions>
4227                                 <create permission="ADMIN_SERIAL_STREAM">
4228                                         <context link="distribution" field="holding_lib" />
4229                                 </create>
4230                                 <retrieve />
4231                                 <update permission="ADMIN_SERIAL_STREAM">
4232                                         <context link="distribution" field="holding_lib" />
4233                                 </update>
4234                                 <delete permission="ADMIN_SERIAL_STREAM">
4235                                         <context link="distribution" field="holding_lib" />
4236                                 </delete>
4237                         </actions>
4238                 </permacrud>
4239         </class>
4240
4241         <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">
4242                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4243                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4244                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4245                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4246                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4247                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4248                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4249                 </fields>
4250                 <links>
4251                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4252                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4253                 </links>
4254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4255                         <actions>
4256                                 <create permission="ADMIN_SERIAL_STREAM">
4257                                         <context link="stream" jump="distribution" field="holding_lib" />
4258                                 </create>
4259                                 <retrieve permission="RECEIVE_SERIAL">
4260                                         <context link="stream" jump="distribution" field="holding_lib" />
4261                                 </retrieve>
4262                                 <update permission="ADMIN_SERIAL_STREAM">
4263                                         <context link="stream" jump="distribution" field="holding_lib" />
4264                                 </update>
4265                                 <delete permission="ADMIN_SERIAL_STREAM">
4266                                         <context link="stream" jump="distribution" field="holding_lib" />
4267                                 </delete>
4268                         </actions>
4269                 </permacrud>
4270         </class>
4271
4272         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4273                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4274                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4275                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4276                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4277                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4278                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4279                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4280                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4281                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4282                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4283                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4284                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4285                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4286                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4287                 </fields>
4288                 <links>
4289                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4290                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4291                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4292                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4293                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4294                 </links>
4295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4296                         <actions>
4297                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4298                                         <context link="subscription" field="owning_lib" />
4299                                 </create>
4300                                 <retrieve/>
4301                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4302                                         <context link="subscription" field="owning_lib" />
4303                                 </update>
4304                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4305                                         <context link="subscription" field="owning_lib" />
4306                                 </delete>
4307                         </actions>
4308                 </permacrud>
4309         </class>
4310
4311         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4312                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4313                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4314                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4315                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4316                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4317                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4318                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4319                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4320                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4321                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4322                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4323                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4324                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4325                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4326                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4327                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4328                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4329                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4330                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4331                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4332                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4333                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4334                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4335                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4336                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4337                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4338                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4339                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4340                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4341                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4342                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4344                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4345                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4346                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4347                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4348                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4349                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4350                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4351                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4352                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4353                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4354                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4355                 </fields>
4356                 <links>
4357                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4358                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4359                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4360                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4361                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4362                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4363                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4364                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4365                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4366                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4367                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4368                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4369                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4370                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4371                 </links>
4372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4373                         <actions>
4374                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4375                                 <retrieve/>
4376                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4377                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4378                         </actions>
4379                 </permacrud>
4380         </class>
4381
4382         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4384                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4385                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4386                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4387                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4388                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4389                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4390                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4391                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4392                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4393                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4394                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4395                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4396                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4398                 </fields>
4399                 <links>
4400                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4401                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4402                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4403                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4404                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4405                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4406                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4407                 </links>
4408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4409                         <actions>
4410                                 <create permission="ADMIN_SERIAL_ITEM">
4411                                         <context link="stream" jump="distribution" field="holding_lib" />
4412                                 </create>
4413                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4414                                         <context link="stream" jump="distribution" field="holding_lib" />
4415                                 </retrieve>
4416                                 <update permission="ADMIN_SERIAL_ITEM">
4417                                         <context link="stream" jump="distribution" field="holding_lib" />
4418                                 </update>
4419                                 <delete permission="ADMIN_SERIAL_ITEM">
4420                                         <context link="stream" jump="distribution" field="holding_lib" />
4421                                 </delete>
4422                         </actions>
4423                 </permacrud>
4424         </class>
4425
4426         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4427                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4428                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4429                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4430                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4431                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4432                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4433                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4434                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4435                 </fields>
4436                 <links>
4437                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4438                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4439                 </links>
4440                 <!-- Not available via PCRUD at this time -->
4441         </class>
4442
4443         <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">
4444                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4445                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4446                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4447                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4448                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4449                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4450                 </fields>
4451                 <links>
4452                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4453                 </links>
4454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4455                         <actions>
4456                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4457                                         <context link="distribution" field="holding_lib" />
4458                                 </create>
4459                                 <retrieve/>
4460                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4461                                         <context link="distribution" field="holding_lib" />
4462                                 </update>
4463                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4464                                         <context link="distribution" field="holding_lib" />
4465                                 </delete>
4466                         </actions>
4467                 </permacrud>
4468         </class>
4469
4470         <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">
4471                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4472                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4473                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4474                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4475                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4476                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4477                 </fields>
4478                 <links>
4479                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4480                 </links>
4481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4482                         <actions>
4483                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4484                                         <context link="distribution" field="holding_lib" />
4485                                 </create>
4486                                 <retrieve/>
4487                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4488                                         <context link="distribution" field="holding_lib" />
4489                                 </update>
4490                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4491                                         <context link="distribution" field="holding_lib" />
4492                                 </delete>
4493                         </actions>
4494                 </permacrud>
4495         </class>
4496
4497         <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">
4498                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4499                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4500                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4501                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4502                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4503                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4504                 </fields>
4505                 <links>
4506                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4507                 </links>
4508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4509                         <actions>
4510                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4511                                         <context link="distribution" field="holding_lib" />
4512                                 </create>
4513                                 <retrieve/>
4514                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4515                                         <context link="distribution" field="holding_lib" />
4516                                 </update>
4517                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4518                                         <context link="distribution" field="holding_lib" />
4519                                 </delete>
4520                         </actions>
4521                 </permacrud>
4522         </class>
4523
4524         <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">
4525                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4526                         <field name="id" reporter:datatype="id" />
4527                         <field name="owning_copy" reporter:datatype="link"/>
4528                         <field name="stat_cat" reporter:datatype="link"/>
4529                         <field name="stat_cat_entry" reporter:datatype="link"/>
4530                 </fields>
4531                 <links>
4532                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4533                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4534                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4535                 </links>
4536         </class>
4537         <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">
4538                 <fields oils_persist:primary="code">
4539                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4540                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4541                 </fields>
4542                 <links/>
4543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4544             <actions>
4545                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4546                 <retrieve/>
4547                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4548                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4549             </actions>
4550         </permacrud>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="code">
4554                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4555                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4556                 </fields>
4557                 <links/>
4558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4559             <actions>
4560                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4561                 <retrieve/>
4562                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4563                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4564             </actions>
4565         </permacrud>
4566         </class>
4567         <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">
4568                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4569                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4570                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4571                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4572                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4573                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4574                 </fields>
4575                 <links>
4576             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4577         </links>
4578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4579             <actions>
4580                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4581                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4582                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4583                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4584             </actions>
4585         </permacrud>
4586         </class>
4587         <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">
4588                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4589                         <field name="id" reporter:datatype="id" />
4590                         <field name="name" reporter:datatype="text"/>
4591                 </fields>
4592                 <links/>
4593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4594             <actions>
4595                 <create permission="CREATE_LASSO" global_required="true"/>
4596                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4597                 <update permission="UPDATE_LASSO" global_required="true"/>
4598                 <delete permission="DELETE_LASSO" global_required="true"/>
4599             </actions>
4600         </permacrud>
4601         </class>
4602         <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">
4603                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4604                         <field name="id" reporter:datatype="id" />
4605                         <field name="lasso" reporter:datatype="link"/>
4606                         <field name="org_unit" reporter:datatype="org_unit"/>
4607                 </fields>
4608                 <links>
4609                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4610                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4611                 </links>
4612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4613             <actions>
4614                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4615                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4616                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4617                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4618             </actions>
4619         </permacrud>
4620         </class>
4621         <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">
4622                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4623                         <field name="id" reporter:datatype="id" />
4624                         <field name="from_org" reporter:datatype="org_unit"/>
4625                         <field name="to_org" reporter:datatype="org_unit"/>
4626                         <field name="prox" reporter:datatype="int" />
4627                 </fields>
4628                 <links>
4629                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4630                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4631                 </links>
4632         </class>
4633         <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">
4634                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4635                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4636                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4637                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4638                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4639                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4640                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4641                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4642                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4643                 </fields>
4644                 <links/>
4645         </class>
4646         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4647                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4648                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4649                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4651                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4652                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4653                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4654                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4655                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4656                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4657                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4658                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4659                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4660                 </fields>
4661                 <links>
4662                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4663                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4664                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4665                 </links>
4666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4667             <actions>
4668                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4669                 <retrieve/>
4670                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4671                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4672             </actions>
4673         </permacrud>
4674         </class>
4675         <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">
4676                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4677                         <field name="address_type"  reporter:datatype="text"/>
4678                         <field name="city"  reporter:datatype="text"/>
4679                         <field name="country"  reporter:datatype="text"/>
4680                         <field name="county"  reporter:datatype="text"/>
4681                         <field name="id" reporter:datatype="id" />
4682                         <field name="org_unit" reporter:datatype="org_unit"/>
4683                         <field name="post_code"  reporter:datatype="text"/>
4684                         <field name="state"  reporter:datatype="text"/>
4685                         <field name="street1"  reporter:datatype="text"/>
4686                         <field name="street2"  reporter:datatype="text"/>
4687                         <field name="valid" reporter:datatype="bool"/>
4688                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4689                 </fields>
4690                 <links>
4691                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4692                 </links>
4693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4694             <actions>
4695                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4696                 <retrieve/>
4697                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4698                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4699             </actions>
4700         </permacrud>
4701         </class>
4702         <!-- A note: Please update alhr when updating ahr -->
4703         <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">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4705                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4706                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4707                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4709                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4710                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4711                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4712                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4713                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4715                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4716                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4717                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4718                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
4719                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="text"/>
4720                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4721                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4722                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4723                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4724                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4725                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4726                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4727                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4728                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4729                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4730                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4731                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4732                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4733                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4734                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4735                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4736                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4737                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4738                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4739                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4740                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4741                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4742                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4743                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4744                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4745                 </fields>
4746                 <links>
4747                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4748                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4749                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4750                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4751                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4752                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4753                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4754                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4755                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4756                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4757                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4758                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4759                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4760                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4761                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4762                         <link field="sms_carrier" reltype="might_have" key="code" map="" class="csc"/>
4763                 </links>
4764         </class>
4765         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4766                 <oils_persist:source_definition>
4767                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
4768                 </oils_persist:source_definition>
4769                 <fields oils_persist:primary="id">
4770                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4771                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4772                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4773                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4774                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4775                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4776                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4777                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4778                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4779                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4780                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4781                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4782                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4783                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4784                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4785                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4786                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4787                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4788                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4789                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4790                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4791                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4792                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4793                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4794                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4795                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4796                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4798                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4799                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4800                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4801                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4802                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4803                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4804                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4805                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4807                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4808                 </fields>
4809                 <links>
4810                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4811                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4812                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4813                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4815                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4817                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4818                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4819                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4820                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4821                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4822                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4823                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4824                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4825                 </links>
4826         </class>
4827
4828         <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">
4829                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4830                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4831                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4832                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4833                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4834                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4835                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4836                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4837                 </fields>
4838                 <links>
4839                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4840                 </links>
4841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4842                         <actions>
4843                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4844                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4845                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4846                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4847                         </actions>
4848                 </permacrud>
4849         </class>
4850         <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">
4851                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4852                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4853                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4854                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4855                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4856                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4857                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4858                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4859                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4860                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4861                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4862                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4863                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4864                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4865                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4866                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4869                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4870                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4871                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4872                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4873                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4874                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4875                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4876                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4877                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4878                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4879                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4881                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4882                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4883                 </fields>
4884                 <links>
4885                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4886                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4887                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4888                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4889                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4890                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4891                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4892                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4893                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4894                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4895                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4896                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4897                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4898                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4899                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4900                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4901                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4902                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4903                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4904                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4905                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4906                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4907                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4908                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4909                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4910                 </links>
4911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4912             <actions>
4913                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4914                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4915                     <context field="id"/>
4916                     <context field="parent_ou"/>
4917                                 </retrieve>
4918                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4919                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4920             </actions>
4921         </permacrud>
4922         </class>
4923         <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">
4924                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4925                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4926                         <field name="btype" reporter:datatype="text"/>
4927                         <field name="id" reporter:datatype="id" />
4928                         <field name="name"  reporter:datatype="text"/>
4929                         <field name="description" reporter:datatype="text"/>
4930                         <field name="owner" reporter:datatype="link"/>
4931                         <field name="pub" reporter:datatype="bool"/>
4932                         <field name="create_time" reporter:datatype="timestamp" />
4933                 </fields>
4934                 <links>
4935                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4936                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4937                 </links>
4938         </class>
4939         <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">
4940                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4941                         <field name="id" reporter:datatype="id" />
4942                         <field name="bucket" reporter:datatype="link"/>
4943                         <field name="note" reporter:datatype="text" />
4944                 </fields>
4945                 <links>
4946                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4947                 </links>
4948         </class>
4949         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4950                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4951                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4952                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4953                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4954                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4955                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4956                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4957                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4958                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4959                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
4960                 </fields>
4961                 <links>
4962                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4963                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4964                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4965                 </links>
4966         </class>
4967         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4969                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4970                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4971                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4972                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4973                 </fields>
4974                 <links>
4975                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4976                 </links>
4977         </class>
4978     <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">
4979         <fields oils_persist:primary="field">
4980             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4981             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4982             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4983         </fields>
4984         <links/>
4985         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4986             <actions>
4987                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4988                 <retrieve />
4989                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4990                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4991             </actions>
4992         </permacrud>
4993     </class>
4994         <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">
4995                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4996                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4997                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4998                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4999                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5000                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5001                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5002                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5003                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5004                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5005                 </fields>
5006                 <links>
5007                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5009                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5010                 </links>
5011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5012             <actions>
5013                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5014                 <retrieve />
5015                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5016                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5017             </actions>
5018         </permacrud>
5019         </class>
5020         <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">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_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="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5033                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5034                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field name="btype" reporter:datatype="text"/>
5036                         <field name="id" reporter:datatype="id" />
5037                         <field name="name"  reporter:datatype="text"/>
5038                         <field name="description" reporter:datatype="text"/>
5039                         <field name="owner" reporter:datatype="link"/>
5040                         <field name="pub" reporter:datatype="bool"/>
5041                         <field name="create_time" reporter:datatype="timestamp" />
5042                 </fields>
5043                 <links>
5044                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5045                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5046                 </links>
5047         </class>
5048         <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">
5049                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5050                         <field name="id" reporter:datatype="id" />
5051                         <field name="bucket" reporter:datatype="link"/>
5052                         <field name="note" reporter:datatype="text" />
5053                 </fields>
5054                 <links>
5055                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5056                 </links>
5057         </class>
5058         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5059                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5060                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5061                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5062                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5063                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5064                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5065                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5066                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5067                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5068                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5069                 </fields>
5070                 <links>
5071                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5072                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5073                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5074                 </links>
5075         </class>
5076         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5077                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5078                         <field name="id" reporter:datatype="id" />
5079                         <field name="ind1" />
5080                         <field name="ind2" />
5081                         <field name="record" />
5082                         <field name="subfield" />
5083                         <field name="tag" />
5084                         <field name="value" />
5085                 </fields>
5086                 <links>
5087                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5088                 </links>
5089         </class>
5090         <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">
5091                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5092                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5093                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5094                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5095                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5096                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5097                 </fields>
5098                 <links>
5099                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5100                 </links>
5101         </class>
5102         <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">
5103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5104                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5105                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5106                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5107                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5108                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5109                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5110                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5111                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5112                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5113                 </fields>
5114                 <links>
5115                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5116                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5117                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5118                 </links>
5119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5120             <actions>
5121                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5122                 <retrieve/>
5123                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5124                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5125             </actions>
5126         </permacrud>
5127         </class>
5128         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5129                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5130                         <field name="create_date" reporter:datatype="timestamp"/>
5131                         <field name="creator" reporter:datatype="link"/>
5132                         <field name="edit_date" reporter:datatype="timestamp"/>
5133                         <field name="editor" reporter:datatype="link"/>
5134                         <field name="id" reporter:datatype="id" />
5135                         <field name="pub" reporter:datatype="bool"/>
5136                         <field name="record" reporter:datatype="link"/>
5137                         <field name="value"  reporter:datatype="text"/>
5138                 </fields>
5139                 <links>
5140                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5141                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5142                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5143                 </links>
5144         </class>
5145         <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">
5146                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5147                         <field name="balance_owed" reporter:datatype="money" />
5148                         <field name="total_owed" reporter:datatype="money" />
5149                         <field name="total_paid" reporter:datatype="money" />
5150                         <field name="usr" reporter:datatype="link"/>
5151                 </fields>
5152                 <links>
5153                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5154                 </links>
5155         </class>
5156         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5157                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5158                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5159                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5160                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5161                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5162                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5163                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5164                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5165                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5166                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5167                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5168                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5169                 </fields>
5170                 <links>
5171                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5172                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5173                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5174                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5175                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5176                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5177                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5178                 </links>
5179         </class>
5180         <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">
5181                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5182                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5183                         <field name="quality" reporter:datatype="int" />
5184                         <field name="source" reporter:datatype="text"/>
5185                         <field name="transcendant" reporter:datatype="bool"/>
5186                         <field name="can_have_copies" reporter:datatype="bool"/>
5187                 </fields>
5188                 <links/>
5189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5190             <actions>
5191                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5192                 <retrieve/>
5193                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5194                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5195             </actions>
5196         </permacrud>
5197         </class>
5198         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5199                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5200                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5202                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5203                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5204                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5205                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5206                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5207                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5208                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5209                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5210                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5211                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5212                 </fields>
5213                 <links>
5214                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5215                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5217                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5218                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5219                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5220                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5221                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5222                 </links>
5223         </class>
5224         <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">
5225                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5226                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5227                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5228                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5229                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5230                 </fields>
5231                 <links>
5232                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5233                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5234                 </links>
5235         </class>
5236         <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">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5238                         <field name="bucket" reporter:datatype="link"/>
5239                         <field name="id" reporter:datatype="id" />
5240                         <field name="target_user" reporter:datatype="link"/>
5241                         <field name="create_time" reporter:datatype="timestamp" />
5242                         <field name="pos" reporter:datatype="int" />
5243                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5244                 </fields>
5245                 <links>
5246                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5247                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5248             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5249                 </links>
5250         </class>
5251         <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">
5252                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5253                         <field name="id" reporter:datatype="id" />
5254                         <field name="item" reporter:datatype="link"/>
5255                         <field name="note" reporter:datatype="text" />
5256                 </fields>
5257                 <links>
5258                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5259                 </links>
5260         </class>
5261         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5262                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5263                         <field name="balance_owed" reporter:datatype="money" />
5264                         <field name="total_owed" reporter:datatype="money" />
5265                         <field name="total_paid" reporter:datatype="money" />
5266                         <field name="usr" reporter:datatype="link"/>
5267                 </fields>
5268                 <links>
5269                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5270                 </links>
5271         </class>
5272         <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">
5273                 <fields oils_persist:primary="code" oils_persist:sequence="">
5274                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5275                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5276                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5277                 </fields>
5278                 <links/>
5279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5280             <actions>
5281                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5282                 <retrieve/>
5283                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5284                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5285             </actions>
5286         </permacrud>
5287         </class>
5288         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5289                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5290                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5291                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5292                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5293                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5294                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5295                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5296                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5297                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5298                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5299                 </fields>
5300                 <links>
5301                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5302                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5303                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5304                 </links>
5305         </class>
5306         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5307                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5308                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5309                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5310                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5311                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5312                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5313                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5315                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5316                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5317                 </fields>
5318                 <links>
5319                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5320                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5321                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5322                 </links>
5323         </class>
5324         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5325                 <fields oils_persist:primary="id" oils_persist:sequence="">
5326                         <field name="checkin_lib" reporter:datatype="link"/>
5327                         <field name="checkin_staff" reporter:datatype="link"/>
5328                         <field name="checkin_time" reporter:datatype="timestamp"/>
5329                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5330                         <field name="circ_staff" reporter:datatype="link"/>
5331                         <field name="desk_renewal" reporter:datatype="bool"/>
5332                         <field name="due_date" reporter:datatype="timestamp"/>
5333                         <field name="duration" reporter:datatype="interval"/>
5334                         <field name="duration_rule" reporter:datatype="link"/>
5335                         <field name="fine_interval" reporter:datatype="interval"/>
5336                         <field name="id" reporter:datatype="id" />
5337                         <field name="max_fine" reporter:datatype="money" />
5338                         <field name="max_fine_rule" reporter:datatype="link"/>
5339                         <field name="opac_renewal" reporter:datatype="bool"/>
5340                         <field name="phone_renewal" reporter:datatype="bool"/>
5341                         <field name="recurring_fine" reporter:datatype="money" />
5342                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5343                         <field name="renewal_remaining" reporter:datatype="int" />
5344             <field name="grace_period" reporter:datatype="interval" />
5345                         <field name="stop_fines" reporter:datatype="text"/>
5346                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5347                         <field name="target_copy" reporter:datatype="link"/>
5348                         <field name="usr" reporter:datatype="link"/>
5349                         <field name="xact_finish" reporter:datatype="timestamp" />
5350                         <field name="xact_start" reporter:datatype="timestamp" />
5351                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5352                 </fields>
5353                 <links>
5354                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5355                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5356                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5357                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5358                 </links>
5359         </class>
5360         <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">
5361                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5362                         <field name="field" reporter:datatype="link"/>
5363                         <field name="id" reporter:datatype="id" />
5364                         <field name="source" reporter:datatype="link"/>
5365                         <field name="value" reporter:datatype="text"/>
5366                 </fields>
5367                 <links>
5368                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5369                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5370                 </links>
5371         </class>
5372         <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">
5373                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5374                         <field name="high" reporter:datatype="money" />
5375                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5376                         <field name="low" reporter:datatype="money" />
5377                         <field name="name" reporter:datatype="text"/>
5378                         <field name="normal" reporter:datatype="money" />
5379                         <field name="recurrence_interval" reporter:datatype="interval"/>
5380             <field name="grace_period" reporter:datatype="interval" />
5381                 </fields>
5382                 <links/>
5383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5384             <actions>
5385                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5386                 <retrieve/>
5387                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5388                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5389             </actions>
5390         </permacrud>
5391         </class>
5392         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5393                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5394                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5395                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5396                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5397                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5398                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5399                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5400                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5401                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5403                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5404                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5405                 </fields>
5406                 <links>
5407                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5408                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5409                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5410                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5411                 </links>
5412         </class>
5413         <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">
5414                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5415                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5416                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5417                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5418                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5419                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5420                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5421                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5422                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5423                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5424                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5425                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5426                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5427                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5428                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5429                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5431                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5432                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5433                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5434                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5435                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5436                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5437                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5438                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5439                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5441                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5442                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5443                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5444                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5445                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5446                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5447                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5448                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5449                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5450                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5451                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5452                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5453                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5454                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5455                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5456                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5457                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5458                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5459                 </fields>
5460                 <links>
5461                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5462                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5463                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5464                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5465                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5467                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5468                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5469                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5470                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5471                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5472                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5473                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5474                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5475                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5476                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5477                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5478                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5479                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5480                 </links>
5481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5482             <actions>
5483                 <create permission="CREATE_COPY">
5484                     <context link="call_number" field="owning_lib"/>
5485                 </create>
5486                 <retrieve/>
5487                 <update permission="UPDATE_COPY">
5488                     <context link="call_number" field="owning_lib"/>
5489                 </update>
5490                 <delete permission="DELETE_COPY">
5491                     <context link="call_number" field="owning_lib"/>
5492                 </delete>
5493             </actions>
5494         </permacrud>
5495         </class>
5496
5497         <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">
5498                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5499                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5500                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5501                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5502                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5503                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5504                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5505                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5506                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5507                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5508                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5509                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5510                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5511                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5512                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5513                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5514                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5515                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5516                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5517                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5518                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5519                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5520                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5521                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5522                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5523                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5524                 </fields>
5525                 <links>
5526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5527                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5528                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5529                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5530                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5531                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5532                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5533                 </links>
5534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535                         <actions>
5536                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5537                                 <retrieve />
5538                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5539                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5540                         </actions>
5541                 </permacrud>
5542         </class>
5543
5544         <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">
5545                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5546                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5547                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5548                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5549                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5550                 </fields>
5551                 <links/>
5552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5553             <actions>
5554                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5555                 <retrieve/>
5556                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5557                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5558             </actions>
5559         </permacrud>
5560         </class>
5561         <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">
5562                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5563                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5564                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5565                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5566                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5567                 </fields>
5568                 <links/>
5569         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5570             <actions>
5571                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5572                 <retrieve/>
5573                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5574                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5575             </actions>
5576         </permacrud>
5577         </class>
5578         <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">
5579                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5580                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5581                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5582                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5583                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5584                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5585                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5586                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5587                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5588                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5589                 </fields>
5590                 <links>
5591                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5592                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5593                 </links>
5594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5595             <actions>
5596                 <create permission="CREATE_PERM" global_required="true"/>
5597                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5598                 <update permission="UPDATE_PERM" global_required="true"/>
5599                 <delete permission="DELETE_PERM" global_required="true"/>
5600             </actions>
5601         </permacrud>
5602         </class>
5603         <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">
5604                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5605                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5606                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5607                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5608                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5609                 </fields>
5610                 <links>
5611                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5612                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5613                 </links>
5614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615             <actions>
5616                 <create permission="ADMIN_SURVEY">
5617                     <context link="question" jump="survey" field="owner"/>
5618                 </create>
5619                 <retrieve/>
5620                 <update permission="ADMIN_SURVEY">
5621                     <context link="question" jump="survey" field="owner"/>
5622                 </update>
5623                 <delete permission="ADMIN_SURVEY">
5624                     <context link="question" jump="survey" field="owner"/>
5625                 </delete>
5626             </actions>
5627         </permacrud>
5628         </class>
5629         <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">
5630                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5631                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5632                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5633                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5634                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5635                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5636                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5637                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5638                 </fields>
5639                 <links>
5640                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5641                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5642                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5643                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5644                 </links>
5645         </class>
5646         <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">
5647                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5648                         <field name="balance_owed" reporter:datatype="money" />
5649                         <field name="total_owed" reporter:datatype="money" />
5650                         <field name="total_paid" reporter:datatype="money" />
5651                         <field name="usr" reporter:datatype="link"/>
5652                 </fields>
5653                 <links>
5654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5655                 </links>
5656         </class>
5657         <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">
5658                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5659                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5660                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5661                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5662                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5663                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5664                 </fields>
5665                 <links>
5666                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5667                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5668                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5669                 </links>
5670         </class>
5671         <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">
5672                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5673                         <field name="field" reporter:datatype="link"/>
5674                         <field name="id" reporter:datatype="id" />
5675                         <field name="source" reporter:datatype="link"/>
5676                         <field name="value" reporter:datatype="text"/>
5677                 </fields>
5678                 <links>
5679                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5680                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5681                 </links>
5682         </class>
5683         <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">
5684                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5685                         <field name="field" reporter:datatype="link"/>
5686                         <field name="id" reporter:datatype="id" />
5687                         <field name="source" reporter:datatype="link"/>
5688                         <field name="value" reporter:datatype="text"/>
5689                 </fields>
5690                 <links>
5691                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5692                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5693                 </links>
5694         </class>
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5697                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5698                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5699                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5700                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5701                 </fields>
5702                 <links>
5703                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5704                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5705                 </links>
5706         </class>
5707         <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">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5709                         <field name="depth" reporter:datatype="int" />
5710                         <field name="grantable" reporter:datatype="bool"/>
5711                         <field name="grp" reporter:datatype="link"/>
5712                         <field name="id" reporter:datatype="id" />
5713                         <field name="perm" reporter:datatype="link"/>
5714                 </fields>
5715                 <links>
5716                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5717                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5718                 </links>
5719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720             <actions>
5721                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5722                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5723                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5724                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5725             </actions>
5726         </permacrud>
5727         </class>
5728         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5730                         <field name="items" oils_persist:virtual="true" />
5731                         <field name="btype" reporter:datatype="text"/>
5732                         <field name="id" reporter:datatype="id" />
5733                         <field name="name" reporter:datatype="text"/>
5734                         <field name="description" reporter:datatype="text"/>
5735                         <field name="owner" reporter:datatype="link"/>
5736                         <field name="pub" reporter:datatype="bool"/>
5737                         <field name="create_time" reporter:datatype="timestamp" />
5738                 </fields>
5739                 <links>
5740                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5741                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5742                 </links>
5743         </class>
5744         <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">
5745                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5746                         <field name="id" reporter:datatype="id" />
5747                         <field name="bucket" reporter:datatype="link"/>
5748                         <field name="note" reporter:datatype="text" />
5749                 </fields>
5750                 <links>
5751                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5752                 </links>
5753         </class>
5754         <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">
5755                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5756                         <field name="id" reporter:datatype="int" />
5757                         <field name="usr" reporter:datatype="link"/>
5758                         <field name="work_ou" reporter:datatype="link"/>
5759                 </fields>
5760                 <links>
5761                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5762                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5763                 </links>
5764         </class>
5765         <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">
5766                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5767                         <field name="depth" reporter:datatype="int"/>
5768                         <field name="grantable" reporter:datatype="bool"/>
5769                         <field name="id" reporter:datatype="id" />
5770                         <field name="perm" reporter:datatype="link"/>
5771                         <field name="usr" reporter:datatype="link"/>
5772                 </fields>
5773                 <links>
5774                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5775                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5776                 </links>
5777         </class>
5778         <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">
5779                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5780                         <field name="object_id" reporter:datatype="text"/>
5781                         <field name="grantable" reporter:datatype="bool"/>
5782                         <field name="id" reporter:datatype="id" />
5783                         <field name="perm" reporter:datatype="link"/>
5784                         <field name="usr" reporter:datatype="link"/>
5785                         <field name="object_type" reporter:datatype="text"/>
5786                 </fields>
5787                 <links>
5788                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5789                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5790                 </links>
5791         </class>
5792         <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">
5793                 <fields oils_persist:primary="id" oils_persist:sequence="">
5794                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5795                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5796                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5797                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5798                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5799                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5800                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5801                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5802                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5803                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5804                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5805                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5806                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5807                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5808                 </fields>
5809                 <links>
5810                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5811                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5812                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5813                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5814                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5815                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5816                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5817                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5818                 </links>
5819         </class>
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="">
5822                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5823                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5824                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5825                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5826                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5827                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5828                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5829                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5830                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5831                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5832                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5833                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5834                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5835                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5836                 </fields>
5837                 <links>
5838                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5839                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5840                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5841                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5842                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5843                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5844                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5845                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5846                 </links>
5847         </class>
5848         <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">
5849                 <fields oils_persist:primary="id" oils_persist:sequence="">
5850                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5851                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5852                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5853                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5854                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5855                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5856                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5857                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5858                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5859                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5860                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5861                 </fields>
5862                 <links>
5863                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5864                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5865                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5866                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5867                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5868                 </links>
5869         </class>
5870         <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">
5871                 <fields oils_persist:primary="id" oils_persist:sequence="">
5872                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5873                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5874                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5875                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5876                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5877                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5878                         <field reporter:label="Accepting User" name="accepting_usr" />
5879                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5880                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5881                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5882                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5883                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5884                 </fields>
5885                 <links>
5886                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5887                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5888                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5889                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5890                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5891                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5892                 </links>
5893         </class>
5894         <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">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5896                         <field name="bucket" reporter:datatype="link"/>
5897                         <field name="id" reporter:datatype="id" />
5898                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5899                         <field name="create_time" reporter:datatype="timestamp" />
5900                         <field name="pos" reporter:datatype="int" />
5901                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5902                 </fields>
5903                 <links>
5904                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5905                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5906             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5907                 </links>
5908         </class>
5909         <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">
5910                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5911                         <field name="id" reporter:datatype="id" />
5912                         <field name="item" reporter:datatype="link"/>
5913                         <field name="note" reporter:datatype="text" />
5914                 </fields>
5915                 <links>
5916                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5917                 </links>
5918         </class>
5919         <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">
5920                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5921                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5922                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5923                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5924                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5925                 </fields>
5926                 <links>
5927                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5928                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5929                 </links>
5930         </class>
5931     <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">
5932         <fields oils_persist:primary="field">
5933             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5934             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5935             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5936         </fields>
5937         <links/>
5938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5939             <actions>
5940                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5941                 <retrieve />
5942                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5943                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5944             </actions>
5945         </permacrud>
5946     </class>
5947         <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">
5948                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5949                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5950                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5951                 </fields>
5952                 <links/>
5953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5954             <actions>
5955                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5956                 <retrieve/>
5957                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5958                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5959             </actions>
5960         </permacrud>
5961         </class>
5962
5963
5964         <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">
5965                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5966                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5967                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5968                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5969                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5970                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5971                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5972                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5973                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5974                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5975                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5976                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5977                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5978                 </fields>
5979                 <links>
5980                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5981                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5982                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5983                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5984                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5985                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5986                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5987                 </links>
5988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5989             <actions>
5990                 <create permission="TRANSIT_COPY">
5991                     <context link="target_copy" field="owner"/>
5992                 </create>
5993                 <retrieve/>
5994                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5995                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5996             </actions>
5997         </permacrud>
5998         </class>
5999         <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">
6000                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6001                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6002                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6003                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6004                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6005                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6007                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6008                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6009                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6010                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6011                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6012                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6013                 </fields>
6014                 <links>
6015                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6016                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6017                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6018                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6019                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6020                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6021                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6022                 </links>
6023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6024             <actions>
6025                 <create permission="TRANSIT_COPY" context_field="owner">
6026                     <context link="target_copy" field="circ_lib"/>
6027                 </create>
6028                 <retrieve/>
6029                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6030                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6031             </actions>
6032         </permacrud>
6033         </class>
6034         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6035                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6036                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6037                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6038                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6039                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6040                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6041                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6042                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6043                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6044                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6045                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6046                 </fields>
6047                 <links>
6048                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6049                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6050                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6051                 </links>
6052         </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6055                         <field name="grp" />
6056                         <field name="id" reporter:datatype="id" />
6057                         <field name="usr" />
6058                 </fields>
6059                 <links>
6060                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6061                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6062                 </links>
6063         </class>
6064         <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">
6065                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6066                         <field name="id" reporter:datatype="id" />
6067                         <field name="fq_field" reporter:datatype="text"/>
6068                         <field name="identity_value" reporter:datatype="text"/>
6069                         <field name="translation" reporter:datatype="text"/>
6070                         <field name="string" reporter:datatype="text"/>
6071                 </fields>
6072                 <links>
6073                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6074                 </links>
6075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6076             <actions>
6077                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6078                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6079                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6080                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6081             </actions>
6082         </permacrud>
6083         </class>
6084         <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">
6085                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6086                         <field name="id" reporter:datatype="id" />
6087                         <field name="fm_class" reporter:datatype="text"/>
6088                         <field name="field" reporter:datatype="text"/>
6089                         <field name="owner" reporter:datatype="org_unit"/>
6090                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6091                 </fields>
6092                 <links>
6093                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6094                 </links>
6095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6096             <actions>
6097                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6098                 <retrieve/>
6099                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6100                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6101             </actions>
6102         </permacrud>
6103         </class>
6104         <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">
6105                 <fields oils_persist:primary="code">
6106                         <field name="code" reporter:datatype="id" />
6107                         <field name="marc_code" reporter:datatype="text"/>
6108                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6109                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6110                 </fields>
6111                 <links/>
6112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6113             <actions>
6114                 <create permission="CREATE_LOCALE" global_required="true"/>
6115                 <retrieve/>
6116                 <update permission="UPDATE_LOCALE" global_required="true"/>
6117                 <delete permission="DELETE_LOCALE" global_required="true"/>
6118             </actions>
6119         </permacrud>
6120         </class>
6121         <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">
6122                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6123                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6124                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6125                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6126             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6127                 </fields>
6128                 <links>
6129                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6130                 </links>
6131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6132             <actions>
6133                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6134                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6135                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6136                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6137             </actions>
6138         </permacrud>
6139         </class>
6140
6141         <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">
6142                 <fields oils_persist:primary="id">
6143                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6144                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6145                 </fields>
6146                 <links/>
6147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148             <actions>
6149                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6150                 <retrieve/>
6151                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6152                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6153             </actions>
6154         </permacrud>
6155         </class>
6156
6157         <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">
6158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6159                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6160                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6161                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6162                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6163                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6164                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6165                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6166                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6167                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6168                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6169                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6170                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6171                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6172                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6173                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6174                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6175                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6176                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6177                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6178                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6179                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6180                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6181                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6182                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6183                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6184                 </fields>
6185                 <links>
6186                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6187                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6188                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6189                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6190                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6191                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6192                 </links>
6193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6194             <actions>
6195                 <create permission="user_request.create">
6196                     <context link="usr" field="home_ou"/>
6197                                 </create>
6198                 <retrieve permission="user_request.view">
6199                     <context link="usr" field="home_ou"/>
6200                                 </retrieve>
6201                 <update permission="user_request.update">
6202                     <context link="usr" field="home_ou"/>
6203                                 </update>
6204                 <delete permission="user_request.delete">
6205                     <context link="usr" field="home_ou"/>
6206                                 </delete>
6207             </actions>
6208         </permacrud>
6209         </class>
6210
6211         <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">
6212                 <fields oils_persist:primary="code">
6213                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6214                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6215                 </fields>
6216                 <links/>
6217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6218             <actions>
6219                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6220                 <retrieve/>
6221                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6222                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6223             </actions>
6224         </permacrud>
6225         </class>
6226
6227         <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">
6228                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6229                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6230                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6231                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6232                         <field reporter:label="Ratio" name="ratio" />
6233                 </fields>
6234                 <links>
6235                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6236                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6237                 </links>
6238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6239                         <actions>
6240                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6241                                 <retrieve/>
6242                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6243                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6244                         </actions>
6245                 </permacrud>
6246         </class>
6247
6248         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6250                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6251                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6252                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6253                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6254                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6255                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6256                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6257                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6258                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6259                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6260                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6261                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6262                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6263                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6264                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6265                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6266                 </fields>
6267                 <links>
6268                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6269                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6270             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6271             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6272             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6273                 </links>
6274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6275             <actions>
6276                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6277                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6278                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6279                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6280             </actions>
6281         </permacrud>
6282         </class>
6283
6284         <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">
6285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6286                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6287                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6288                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6289                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6290                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6291                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6292                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6293                 </fields>
6294                 <links>
6295                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6296                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6297                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6298                 </links>
6299         </class>
6300
6301         <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">
6302                 <fields oils_persist:primary="code">
6303                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6304                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6305                 </fields>
6306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6307             <actions>
6308                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6309                 <retrieve/>
6310                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6311                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6312             </actions>
6313                 </permacrud>
6314         </class>
6315
6316         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6317                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6318                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6319                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6320                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6321                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6322                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6323                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6324                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6325                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6326                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6327                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6328                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6329                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6330                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6331                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6332                 </fields>
6333                 <links>
6334                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6335                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6336                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6337                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6338                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6339                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6340                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6341                 </links>
6342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6343             <actions>
6344                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6345                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6346                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6347                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6348             </actions>
6349         </permacrud>
6350         </class>
6351
6352         <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">
6353                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6355                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6356                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6357                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6358                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6359                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6360                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6361                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6362                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6363                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6364                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6365                 </fields>
6366                 <links>
6367                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6368                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6369                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6370                 </links>
6371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6372             <actions>
6373                 <create   permission="ADMIN_INVOICE">
6374                                         <context link="invoice" field="receiver"/>
6375                                 </create>
6376                 <retrieve permission="ADMIN_INVOICE">
6377                                         <context link="invoice" field="receiver"/>
6378                                 </retrieve>
6379                 <update   permission="ADMIN_INVOICE">
6380                                         <context link="invoice" field="receiver"/>
6381                                 </update>
6382                                 <delete   permission="ADMIN_INVOICE">
6383                                         <context link="invoice" field="receiver"/>
6384                                 </delete>
6385             </actions>
6386         </permacrud>
6387         </class>
6388
6389         <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">
6390                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6392                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6393                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6394                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6395                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6396                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6397                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6398                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6399                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6400                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6401                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6402                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6403                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6404                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6405                 </fields>
6406                 <links>
6407                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6408                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6409                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6410                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6411                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6412                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6413                 </links>
6414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6415             <actions>
6416                 <create   permission="ADMIN_INVOICE">
6417                                         <context link="invoice" field="receiver"/>
6418                                 </create>
6419                 <retrieve permission="ADMIN_INVOICE">
6420                                         <context link="invoice" field="receiver"/>
6421                                 </retrieve>
6422                 <update   permission="ADMIN_INVOICE">
6423                                         <context link="invoice" field="receiver"/>
6424                                 </update>
6425                                 <delete   permission="ADMIN_INVOICE">
6426                                         <context link="invoice" field="receiver"/>
6427                                 </delete>
6428             </actions>
6429         </permacrud>
6430         </class>
6431
6432         <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">
6433                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6434                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6435                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6436                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6437                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6439                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6440                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6441                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6442                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6443                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6444                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6445                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6446                 </fields>
6447                 <links>
6448                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6449                 </links>
6450         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6451             <actions>
6452                 <create permission="ADMIN_PROVIDER">
6453                     <context link="provider" field="owner"/>
6454                 </create>
6455                 <retrieve permission="ADMIN_PROVIDER">
6456                     <context link="provider" field="owner"/>
6457                 </retrieve>
6458                 <update permission="ADMIN_PROVIDER">
6459                     <context link="provider" field="owner"/>
6460                 </update>
6461                 <delete permission="ADMIN_PROVIDER">
6462                     <context link="provider" field="owner"/>
6463                 </delete>
6464             </actions>
6465         </permacrud>
6466         </class>
6467
6468         <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">
6469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6471                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6472                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6473                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6474                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6475                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6476         </fields>
6477                 <links>
6478                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6479                 </links>
6480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6481             <actions>
6482                 <create permission="ADMIN_PROVIDER">
6483                     <context link="provider" field="owner"/>
6484                 </create>
6485                 <retrieve permission="ADMIN_PROVIDER">
6486                     <context link="provider" field="owner"/>
6487                 </retrieve>
6488                 <update permission="ADMIN_PROVIDER">
6489                     <context link="provider" field="owner"/>
6490                 </update>
6491                 <delete permission="ADMIN_PROVIDER">
6492                     <context link="provider" field="owner"/>
6493                 </delete>
6494             </actions>
6495         </permacrud>
6496     </class>
6497         <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">
6498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6499                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6500                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6501                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6502                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6503                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6504                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6505                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6506                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6507                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6508                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6509                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6510                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6511                 </fields>
6512                 <links>
6513                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6514                 </links>
6515         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6516             <actions>
6517                 <create permission="ADMIN_PROVIDER">
6518                     <context link="contact" jump='provider' field="owner"/>
6519                 </create>
6520                 <retrieve permission="ADMIN_PROVIDER">
6521                     <context link="contact" jump='provider' field="owner"/>
6522                 </retrieve>
6523                 <update permission="ADMIN_PROVIDER">
6524                     <context link="contact" jump='provider' field="owner"/>
6525                 </update>
6526                 <delete permission="ADMIN_PROVIDER">
6527                     <context link="contact" jump='provider' field="owner"/>
6528                 </delete>
6529             </actions>
6530         </permacrud>
6531         </class>
6532
6533         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6535                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6536                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6537                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6538                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6539                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6540                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6541                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6542                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6543                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6544                 </fields>
6545                 <links>
6546                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6547                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6548                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6549                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6550                 </links>
6551         </class>
6552
6553         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6555                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6556                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6557                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6558                 </fields>
6559                 <links>
6560             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6561                 </links>
6562                 <!--
6563                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6564                         But here's what it should look like if we ever do use pcrud.
6565                 -->
6566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6567                         <actions>
6568                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6569                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6570                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6571                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6572                         </actions>
6573                 </permacrud>
6574         </class>
6575
6576         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6578                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6579                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6580                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6581                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6582                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6583                 </fields>
6584                 <links>
6585                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6586                 </links>
6587                 <!--
6588                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6589                         But here's what it should look like if we ever do use pcrud.
6590                 -->
6591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6592                         <actions>
6593                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6594                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6595                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6596                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6597                         </actions>
6598                 </permacrud>
6599         </class>
6600
6601         <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">
6602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6603                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6604                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6605                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6606                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6607                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6608                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6609                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6610                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6611                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6612                 </fields>
6613                 <links>
6614                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6615                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6616             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6617             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6618                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6619                 </links>
6620         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6621             <actions>
6622                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6623                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6624                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6625                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6626             </actions>
6627         </permacrud>
6628         </class>
6629
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6632                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6633                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6634                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6635                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6636                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6637                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6638                 </fields>
6639                 <links>
6640                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6641                 </links>
6642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6643                         <actions>
6644                                 <create permission="ADMIN_FUNDING_SOURCE">
6645                     <context link="funding_source" field="owner"/>
6646                 </create>
6647                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6648                     <context link="funding_source" field="owner"/>
6649                 </retrieve>
6650                                 <update permission="ADMIN_FUNDING_SOURCE">
6651                     <context link="funding_source" field="owner"/>
6652                 </update>
6653                                 <delete permission="ADMIN_FUNDING_SOURCE">
6654                     <context link="funding_source" field="owner"/>
6655                 </delete>
6656                         </actions>
6657                 </permacrud>
6658         </class>
6659
6660         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
6661                 <fields oils_persist:primary="id">
6662                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6663                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6664                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6666                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6667                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6668                 </fields>
6669                 <links>
6670                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6671                 </links>
6672         </class>
6673
6674         <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">
6675                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6676                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6677                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6678                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6679                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6680                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6681                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6682                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6683                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6684                 </fields>
6685                 <links>
6686                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6687                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6688                 </links>
6689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6690                         <actions>
6691                                 <create permission="ADMIN_ACQ_FUND">
6692                     <context link="fund" field="org"/>
6693                 </create>
6694                                 <retrieve permission="ADMIN_ACQ_FUND">
6695                     <context link="fund" field="org"/>
6696                 </retrieve>
6697                                 <update permission="ADMIN_ACQ_FUND">
6698                     <context link="fund" field="org"/>
6699                 </update>
6700                                 <delete permission="ADMIN_ACQ_FUND">
6701                     <context link="fund" field="org"/>
6702                 </delete>
6703                         </actions>
6704                 </permacrud>
6705         </class>
6706
6707         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6708                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6709                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6710                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6711                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6712                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6713                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6714                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6715                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6716                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6717                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6718                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6719                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6720                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6721                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6722                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6723                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6724                 </fields>
6725                 <links>
6726                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6727                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6728             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6729             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6730             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6731                 </links>
6732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6733             <actions>
6734                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6735                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6736                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6737                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6738             </actions>
6739         </permacrud>
6740         </class>
6741
6742         <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">
6743                 <fields oils_persist:primary="fund">
6744                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6745                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6746                 </fields>
6747                 <links>
6748                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6749                 </links>
6750         </class>
6751
6752         <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">
6753                 <fields oils_persist:primary="fund">
6754                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6755                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6756                 </fields>
6757                 <links>
6758                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6759                 </links>
6760         </class>
6761
6762         <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">
6763                 <fields oils_persist:primary="fund">
6764                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6765                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6766                 </fields>
6767                 <links>
6768                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6769                 </links>
6770         </class>
6771
6772         <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">
6773                 <fields oils_persist:primary="fund">
6774                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6775                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6776                 </fields>
6777                 <links>
6778                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6779                 </links>
6780         </class>
6781
6782         <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">
6783                 <fields oils_persist:primary="fund">
6784                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6785                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6786                 </fields>
6787                 <links>
6788                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6789                 </links>
6790         </class>
6791
6792    <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">
6793         <fields oils_persist:primary="fund">
6794             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6795             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6796         </fields>
6797         <links>
6798             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6799         </links>
6800     </class>
6801
6802    <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">
6803         <fields oils_persist:primary="fund">
6804             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6805             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6806         </fields>
6807         <links>
6808             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6809         </links>
6810     </class>
6811
6812    <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">
6813         <fields oils_persist:primary="fund">
6814             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6815             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6816         </fields>
6817         <links>
6818             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6819         </links>
6820     </class>
6821
6822    <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">
6823         <fields oils_persist:primary="fund">
6824             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6825             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6826         </fields>
6827         <links>
6828             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6829         </links>
6830     </class>
6831
6832    <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">
6833         <fields oils_persist:primary="fund">
6834             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6835             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6836         </fields>
6837         <links>
6838             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6839         </links>
6840     </class>
6841
6842         <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">
6843                 <fields oils_persist:primary="funding_source">
6844                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6845                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6846                 </fields>
6847                 <links>
6848                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6849                 </links>
6850         </class>
6851
6852         <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">
6853                 <fields oils_persist:primary="funding_source">
6854                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6855                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6856                 </fields>
6857                 <links>
6858                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6859                 </links>
6860         </class>
6861
6862         <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">
6863                 <fields oils_persist:primary="funding_source">
6864                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6865                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6866                 </fields>
6867                 <links>
6868                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6869                 </links>
6870         </class>
6871
6872         <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">
6873                 <fields oils_persist:primary="fund">
6874                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6875                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6876                 </fields>
6877                 <links>
6878                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6879                 </links>
6880         </class>
6881
6882         <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">
6883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6884                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6885                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6886                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6887                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6888                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6889                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6890                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6891                 </fields>
6892                 <links>
6893                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6894                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6895                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6896                 </links>
6897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6898                         <actions>
6899                                 <create permission="ADMIN_ACQ_FUND">
6900                     <context link="fund" field="org"/>
6901                 </create>
6902                                 <retrieve permission="ADMIN_ACQ_FUND">
6903                     <context link="fund" field="org"/>
6904                 </retrieve>
6905                                 <update permission="ADMIN_ACQ_FUND">
6906                     <context link="fund" field="org"/>
6907                 </update>
6908                                 <delete permission="ADMIN_ACQ_FUND">
6909                     <context link="fund" field="org"/>
6910                 </delete>
6911                         </actions>
6912                 </permacrud>
6913         </class>
6914
6915     <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">
6916         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6917             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6918             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6919             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6920             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6921             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6922             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6923             <field reporter:label="Note" name="note" reporter:datatype="text" />
6924             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6925         </fields>
6926         <links>
6927             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6928             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6929             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6930         </links>
6931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6932                         <actions>
6933                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6934                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6935                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6936                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6937                         </actions>
6938                 </permacrud>
6939     </class>
6940
6941         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6943                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6944                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6945                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6946                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6947                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6948                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6949                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6950                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6951                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6952                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6953                 </fields>
6954                 <links>
6955                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6956                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6957                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6958                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6959                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6960                 </links>
6961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6962                         <actions>
6963                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6964                         </actions>
6965                 </permacrud>
6966         </class>
6967
6968         <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">
6969                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6970                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6971                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6972                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6973                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6974                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6975                 </fields>
6976                 <links>
6977                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6978                 </links>
6979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6980                         <actions>
6981                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6982                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6983                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6984                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6985                         </actions>
6986                 </permacrud>
6987         </class>
6988
6989         <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">
6990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6991                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6992                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6993                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6994                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6995                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6996                         <field reporter:label="State" name="state" reporter:datatype="text" />
6997                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6998                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6999                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7000                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7001                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7002                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7003                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7004                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7005                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7006                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7007                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7008                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7009                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7010                 </fields>
7011                 <links>
7012                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7013                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7014                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7015                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7016                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7017                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7018                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7019                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7020                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7021                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7022                 </links>
7023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7024                         <actions>
7025                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7026                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7027                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7028                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7029                         </actions>
7030                 </permacrud>
7031         </class>
7032
7033         <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">
7034                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7035                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7036                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7037                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7038                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7039                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7040                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7041                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7042                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7043                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7044                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7045                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7046                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7047                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7048                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7049                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7050                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7051                 </fields>
7052                 <links>
7053                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7054                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7055                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7056                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7057                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7058                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7059                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7060                 </links>
7061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7062             <actions>
7063                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7064             </actions>
7065                 </permacrud>
7066         </class>
7067
7068         <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">
7069                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7070                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7071                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7072                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7073                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7074                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7075                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7076                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7077                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7078                 </fields>
7079                 <links>
7080                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7081                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7082                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7083                 </links>
7084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7085             <actions>
7086                 <create permission="CREATE_PURCHASE_ORDER">
7087                     <context link="purchase_order" field="ordering_agency"/>
7088                 </create>
7089                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7090                     <context link="purchase_order" field="ordering_agency"/>
7091                 </retrieve>
7092                 <update permission="CREATE_PURCHASE_ORDER">
7093                     <context link="purchase_order" field="ordering_agency"/>
7094                 </update>
7095                 <delete permission="CREATE_PURCHASE_ORDER">
7096                     <context link="purchase_order" field="ordering_agency"/>
7097                 </delete>
7098             </actions>
7099                 </permacrud>
7100         </class>
7101
7102         <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">
7103                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7104                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7105                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7106                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7107                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7108                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7109                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7110                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7111                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7112                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7113                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7114                 </fields>
7115                 <links>
7116                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7117                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7118                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7119                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7120                 </links>
7121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7122             <actions>
7123                 <create permission="CREATE_PURCHASE_ORDER">
7124                     <context link="purchase_order" field="ordering_agency"/>
7125                 </create>
7126                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7127                     <context link="purchase_order" field="ordering_agency"/>
7128                 </retrieve>
7129                 <update permission="CREATE_PURCHASE_ORDER">
7130                     <context link="purchase_order" field="ordering_agency"/>
7131                 </update>
7132                 <delete permission="CREATE_PURCHASE_ORDER">
7133                     <context link="purchase_order" field="ordering_agency"/>
7134                 </delete>
7135             </actions>
7136                 </permacrud>
7137         </class>
7138
7139         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7141                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7142                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7143                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7144                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7145                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7146                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7147                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7148                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7149                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7150                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7151                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7152                         <field reporter:label="State" name="state" reporter:datatype="text" />
7153                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7154                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7155                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7156                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7157                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7158                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7159                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7160                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7161                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7162                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7163                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7164                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7165                 </fields>
7166                 <links>
7167                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7168                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7169                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7170                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7171                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7172                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7173                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7174                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7175                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7176                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7177                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7178                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7179                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7180                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7181                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7182                 </links>
7183                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7184                         <actions>
7185                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7186                                         <context link="purchase_order" field="ordering_agency"/>
7187                                         <context link="picklist" field="org_unit"/>
7188                                 </retrieve>
7189                         </actions>
7190                 </permacrud>
7191         </class>
7192
7193         <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">
7194                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7195                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7196                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7197                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7198                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7199                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7200                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7201                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7202                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7203                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7204                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7205                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7206                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7207                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7208                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7209                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7210                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7211                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7212                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7213                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7214                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7215                 </fields>
7216                 <links>
7217                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7218                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7219                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7220                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7221                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7222                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7223                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7224                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7225                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7226                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7227                 </links>
7228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7229                         <actions>
7230                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7231                                         <context link="purchase_order" field="ordering_agency"/>
7232                                         <context link="picklist" field="org_unit"/>
7233                                 </retrieve>
7234                         </actions>
7235                 </permacrud>
7236         </class>
7237
7238         <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">
7239                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7240                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7241                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7242                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7243                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7244                 </fields>
7245                 <links>
7246                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7247                 </links>
7248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7249                         <actions>
7250                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7251                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7252                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7253                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7254                         </actions>
7255                 </permacrud>
7256         </class>
7257
7258         <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">
7259                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7260                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7261                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7262                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7263                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7264                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7265                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7266                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7267                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7268                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7269                 </fields>
7270                 <links>
7271                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7272                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7273                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7274                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7275                 </links>
7276         </class>
7277
7278         <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">
7279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7280                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7281                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7282                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7283                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7284                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7285                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7286                 </fields>
7287                 <links>
7288                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7289                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7290                 </links>
7291         </class>
7292
7293         <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">
7294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7295                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7296                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7297                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7298                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7299                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7300                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7301                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7302                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7303                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7304                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7305                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7306                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7307                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7308                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7309                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7310                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7311                 </fields>
7312                 <links>
7313                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7314                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7315                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7316                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7317                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7318                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7319                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7320                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7321                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7322                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7323                 </links>
7324         </class>
7325
7326         <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">
7327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7328                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7329                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7331                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7332                 </fields>
7333                 <links/>
7334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7335                         <actions>
7336                                 <retrieve />
7337                         </actions>
7338                 </permacrud>
7339         </class>
7340
7341         <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">
7342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7343                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7344                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7345                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7346                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7347                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7348             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7349                 </fields>
7350                 <links/>
7351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7352             <actions>
7353                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7354                 <retrieve />
7355                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7356                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7357             </actions>
7358         </permacrud>
7359         </class>
7360
7361         <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">
7362                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7363                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7364                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7365                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7366                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7367                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7368                 </fields>
7369                 <links/>
7370         </class>
7371         <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">
7372                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7373                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7374                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7375                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7376                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7377                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7378                 </fields>
7379                 <links>
7380                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7381                 </links>
7382         </class>
7383
7384         <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">
7385             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7386                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7387                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7388                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7389                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7390                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7391                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7392         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7393
7394             </fields>
7395             <links>
7396                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7397             </links>
7398             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7399                 <actions>
7400                     <create permission="ADMIN_PROVIDER">
7401                         <context link="provider" field="owner"/>
7402                     </create>
7403                     <retrieve permission="ADMIN_PROVIDER">
7404                         <context link="provider" field="owner"/>
7405                     </retrieve>
7406                     <update permission="ADMIN_PROVIDER">
7407                         <context link="provider" field="owner"/>
7408                     </update>
7409                     <delete permission="ADMIN_PROVIDER">
7410                         <context link="provider" field="owner"/>
7411                     </delete>
7412                 </actions>
7413             </permacrud>
7414         </class>
7415         
7416         <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">
7417             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7418                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7419                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7420                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7421                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7422             </fields>
7423             <links>
7424                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7425             </links>
7426             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7427                 <actions>
7428                     <create permission="ADMIN_PROVIDER">
7429                         <context link="provider" field="owner"/>
7430                     </create>
7431                     <retrieve permission="ADMIN_PROVIDER">
7432                         <context link="provider" field="owner"/>
7433                     </retrieve>
7434                     <update permission="ADMIN_PROVIDER">
7435                         <context link="provider" field="owner"/>
7436                     </update>
7437                     <delete permission="ADMIN_PROVIDER">
7438                         <context link="provider" field="owner"/>
7439                     </delete>
7440                 </actions>
7441             </permacrud>
7442         </class>
7443         
7444         <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">
7445             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7446                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7447                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7448                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7449                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7450                 </fields>
7451                 <links/>
7452         </class>
7453
7454         <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">
7455                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7456                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7457                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7458                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7459                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7460                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7461                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7462                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7463                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7464                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7465                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7466                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7467                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7468                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7469                 </fields>
7470                 <links>
7471                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7473                 </links>
7474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475             <actions>
7476                 <create permission="ADMIN_PROVIDER">
7477                     <context link="provider" field="owner"/>
7478                 </create>
7479                 <retrieve permission="ADMIN_PROVIDER">
7480                     <context link="provider" field="owner"/>
7481                 </retrieve>
7482                 <update permission="ADMIN_PROVIDER">
7483                     <context link="provider" field="owner"/>
7484                 </update>
7485                 <delete permission="ADMIN_PROVIDER">
7486                     <context link="provider" field="owner"/>
7487                 </delete>
7488             </actions>
7489         </permacrud>
7490         </class>
7491
7492         <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">
7493                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7494                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7495                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7496                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7497                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7498                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7499                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7500                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7501                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7502                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7503                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7504                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7505                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7506                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7507                 </fields>
7508                 <links>
7509                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7510                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7511                 </links>
7512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7513             <actions>
7514                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7515                     <context link="account" jump="provider" field="owner"/>
7516                 </retrieve>
7517                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7518                     <context link="account" jump="provider" field="owner"/>
7519                 </update>
7520                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7521                     <context link="account" jump="provider" field="owner"/>
7522                 </delete>
7523             </actions>
7524         </permacrud>
7525         </class>
7526
7527
7528         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7529                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7530                         <field name="id" reporter:datatype="id" />
7531                         <field name="parent" reporter:datatype="link"/>
7532                         <field name="owner" reporter:datatype="link"/>
7533                         <field name="create_time" reporter:datatype="timestamp"/>
7534                         <field name="name" reporter:datatype="text"/>
7535                         <field name="shared" reporter:datatype="bool"/>
7536                         <field name="share_with" reporter:datatype="link"/>
7537                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7538                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7539                 </fields>
7540                 <links>
7541                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7542                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7543                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7544                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7545                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7546                 </links>
7547         </class>
7548         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7549                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7550                         <field name="id" reporter:datatype="id" />
7551                         <field name="parent" reporter:datatype="link"/>
7552                         <field name="owner" reporter:datatype="link"/>
7553                         <field name="create_time" reporter:datatype="timestamp"/>
7554                         <field name="name" reporter:datatype="text"/>
7555                         <field name="shared" reporter:datatype="bool"/>
7556                         <field name="share_with" reporter:datatype="link"/>
7557                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7558                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7559                 </fields>
7560                 <links>
7561                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7562                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7563                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7564                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7565                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7566                 </links>
7567         </class>
7568         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7570                         <field name="id" reporter:datatype="id" />
7571                         <field name="parent" reporter:datatype="link"/>
7572                         <field name="owner" reporter:datatype="link"/>
7573                         <field name="create_time" reporter:datatype="timestamp"/>
7574                         <field name="name" reporter:datatype="text"/>
7575                         <field name="shared" reporter:datatype="bool"/>
7576                         <field name="share_with" reporter:datatype="link"/>
7577                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7578                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7579                 </fields>
7580                 <links>
7581                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7582                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7583                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7584                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7585                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7586                 </links>
7587         </class>
7588         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7589                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7590                         <field name="id" reporter:datatype="id" />
7591                         <field name="owner" reporter:datatype="link"/>
7592                         <field name="create_time" reporter:datatype="timestamp"/>
7593                         <field name="name" reporter:datatype="text"/>
7594                         <field name="data" reporter:datatype="text"/>
7595                         <field name="folder" reporter:datatype="link"/>
7596                         <field name="description" reporter:datatype="text"/>
7597                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7598                 </fields>
7599                 <links>
7600                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7601                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7602                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7603                 </links>
7604         </class>
7605         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7606                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7607                         <field name="id" reporter:datatype="id" />
7608                         <field name="owner" reporter:datatype="link"/>
7609                         <field name="create_time" reporter:datatype="timestamp"/>
7610                         <field name="template" reporter:datatype="link"/>
7611                         <field name="data" reporter:datatype="text"/>
7612                         <field name="folder" reporter:datatype="link"/>
7613                         <field name="recur" reporter:datatype="bool"/>
7614                         <field name="recurrence" reporter:datatype="interval"/>
7615                         <field name="name" reporter:datatype="text"/>
7616                         <field name="description" reporter:datatype="text"/>
7617                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7618                 </fields>
7619                 <links>
7620                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7621                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7622                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7623                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7624                 </links>
7625         </class>
7626         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7627                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7628                         <field name="id" reporter:datatype="id" />
7629                         <field name="runner" reporter:datatype="link"/>
7630                         <field name="start_time" reporter:datatype="timestamp"/>
7631                         <field name="complete_time" reporter:datatype="timestamp"/>
7632                         <field name="run_time" reporter:datatype="timestamp"/>
7633                         <field name="email" reporter:datatype="text"/>
7634                         <field name="excel_format" reporter:datatype="bool"/>
7635                         <field name="csv_format" reporter:datatype="bool"/>
7636                         <field name="html_format" reporter:datatype="bool"/>
7637                         <field name="error_code" reporter:datatype="int"/>
7638                         <field name="error_text" reporter:datatype="text"/>
7639                         <field name="report" reporter:datatype="link"/>
7640                         <field name="folder" reporter:datatype="link"/>
7641                         <field name="chart_pie" reporter:datatype="bool"/>
7642                         <field name="chart_bar" reporter:datatype="bool"/>
7643                         <field name="chart_line" reporter:datatype="bool"/>
7644                 </fields>
7645                 <links>
7646                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7647                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7648                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7649                 </links>
7650         </class>
7651         <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">
7652                 <fields oils_persist:primary="id">
7653                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7654                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7655                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7656                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7657                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7658                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7659                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7660                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7661                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7662                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7663                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7664                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7665                 </fields>
7666                 <links>
7667                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7668                 </links>
7669         </class>
7670         <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">
7671                 <fields oils_persist:primary="id">
7672                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7673                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7674                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7675                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7676                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7677                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7678                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7679                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7680                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7681                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7682                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7683                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7684                 </fields>
7685                 <links>
7686                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7687                 </links>
7688         </class>
7689         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7690                 <fields oils_persist:primary="id">
7691                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7692                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7693                         <field reporter:label="Fingerprint" name="fingerprint" />
7694                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7695                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7696                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7697                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7698                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7699                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7700                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7701                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7702                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7703                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7704                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7705                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7706                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7707                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7708                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7709                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7710                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7711                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7712                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7713                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7714                 </fields>
7715                 <links>
7716                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7717                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7718                 </links>
7719         </class>
7720         <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">
7721                 <fields oils_persist:primary="id">
7722                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7723                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7724                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7725                 </fields>
7726                 <links>
7727                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7728                 </links>
7729         </class>
7730         <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">
7731                 <fields oils_persist:primary="id">
7732                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7733                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7734                 </fields>
7735                 <links>
7736                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7737                 </links>
7738         </class>
7739         <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">
7740                 <fields oils_persist:primary="id">
7741                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7742                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7743                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7744                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7745                 </fields>
7746                 <links>
7747                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7748                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7749                 </links>
7750         </class>
7751         <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">
7752                 <fields oils_persist:primary="xact">
7753                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7754                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7755                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7756                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7757                 </fields>
7758                 <links>
7759                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7760                 </links>
7761         </class>
7762         <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">
7763                 <fields oils_persist:primary="xact">
7764                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7765                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7766                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7767                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7768                 </fields>
7769                 <links>
7770                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7771                 </links>
7772         </class>
7773         <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)">
7774                 <fields oils_persist:primary="id">
7775                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7776                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7777                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7778                 </fields>
7779                 <links>
7780                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7781                 </links>
7782         </class>
7783         <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">
7784                 <fields oils_persist:primary="id">
7785                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7786                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7787                 </fields>
7788                 <links>
7789                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7790                 </links>
7791         </class>
7792         <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">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7794                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7795                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7796                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7797                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7798                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7799                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7800                 </fields>
7801                 <links>
7802                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7803                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7804                 </links>
7805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7806                         <actions>
7807                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7808                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7809                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7810                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7811                         </actions>
7812                 </permacrud>
7813         </class>
7814         <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">
7815                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7816                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7817                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7818                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7819                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7820                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7821                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7822                 </fields>
7823                 <links>
7824                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7825                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7826                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7827                 </links>
7828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7829                         <actions>
7830                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7831                                         <context link="formula" field="owner"/>
7832                                 </create>
7833                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7834                                         <context link="formula" field="owner"/>
7835                                 </retrieve>
7836                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7837                                         <context link="formula" field="owner"/>
7838                                 </update>
7839                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7840                                         <context link="formula" field="owner"/>
7841                                 </delete>
7842                         </actions>
7843                 </permacrud>
7844         </class>
7845
7846         <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">
7847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7848                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7849                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7850                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7851                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7852                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7853                 </fields>
7854                 <links>
7855                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7856                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7857                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7858                 </links>
7859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7860                         <actions>
7861                                 <create permission="CREATE_PURCHASE_ORDER">
7862                                         <context link="formula" field="owner"/>
7863                 </create>
7864                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7865                                         <context link="formula" field="owner"/>
7866                 </retrieve>
7867                                 <update permission="CREATE_PURCHASE_ORDER">
7868                                         <context link="formula" field="owner"/>
7869                 </update>
7870                                 <delete permission="CREATE_PURCHASE_ORDER">
7871                                         <context link="formula" field="owner"/>
7872                 </delete>
7873                         </actions>
7874                 </permacrud>
7875         </class>
7876
7877         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
7878                 <fields oils_persist:primary="id">
7879                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7880                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7881                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7882                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7883                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7884                 </fields>
7885                 <links>
7886                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7887                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7888                 </links>
7889         </class>
7890
7891         <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">
7892                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7893                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7894                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7895                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7896                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7897                 </fields>
7898                 <links>
7899                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7900                 </links>
7901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7902                         <actions>
7903                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7904                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7905                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7906                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7907                         </actions>
7908                 </permacrud>
7909         </class>
7910
7911         <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">
7912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7913                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7914                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7915                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7916                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7917                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7918                 </fields>
7919                 <links>
7920                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7921                 </links>
7922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7923                         <actions>
7924                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7925                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7926                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7927                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7928                         </actions>
7929                 </permacrud>
7930         </class>
7931
7932         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7933                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7934                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7935                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7936                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7937                 </fields>
7938                 <links>
7939                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7940                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7941                 </links>
7942         </class>
7943
7944         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7945                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7946                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7947                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7948                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7949                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7950                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7951                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7952                 </fields>
7953                 <links>
7954                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7955                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7956                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7957                 </links>
7958         </class>
7959
7960         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7962                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7963                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7964                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7965                 </fields>
7966                 <links>
7967                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7968                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7969                 </links>
7970         </class>
7971
7972         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7973                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7974                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7975                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7976                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7977                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7978                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7979                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7980                 </fields>
7981                 <links>
7982                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7983                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7984                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7985                 </links>
7986         </class>
7987
7988         <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">
7989                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7990                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7991                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7992                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7993                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7994                 </fields>
7995                 <links>
7996                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7997                 </links>
7998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7999             <actions>
8000                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8001                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8002                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8003                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8004             </actions>
8005                 </permacrud>
8006         </class>
8007
8008         <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">
8009                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8010                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8011                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8012                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8013                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8014                 </fields>
8015                 <links>
8016                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8017                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8018                 </links>
8019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8020                         <actions>
8021                                 <create permission="ADMIN_CLAIM_POLICY">
8022                                         <context link="claim_policy" field="org_unit"/>
8023                 </create>
8024                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8025                                         <context link="claim_policy" field="org_unit"/>
8026                 </retrieve>
8027                                 <update permission="ADMIN_CLAIM_POLICY">
8028                                         <context link="claim_policy" field="org_unit"/>
8029                 </update>
8030                                 <delete permission="ADMIN_CLAIM_POLICY">
8031                                         <context link="claim_policy" field="org_unit"/>
8032                 </delete>
8033                         </actions>
8034                 </permacrud>
8035         </class>
8036
8037     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8038         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8039             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8040             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8041             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8042             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8043             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8044             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8045             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8046             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8047             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8048             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8049             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8050             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8051             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8052             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8053             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8054         </fields>
8055     </class>
8056
8057     <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">
8058         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8059             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8060             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8061             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8062             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8063             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8064         </fields>
8065     </class>
8066
8067     <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">
8068         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8069             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8070             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8071             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8072             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8073             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8074             <field reporter:label="City" name="city" reporter:datatype="text"/>
8075             <field reporter:label="State" name="state" reporter:datatype="text"/>
8076             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8077             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8078             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8079         </fields>
8080     </class>
8081
8082     <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">
8083         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8084             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8085             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8086             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8087             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8088             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8089             <field reporter:label="City" name="city" reporter:datatype="text"/>
8090             <field reporter:label="State" name="state" reporter:datatype="text"/>
8091             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8092             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8093             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8094         </fields>
8095     </class>
8096
8097     <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">
8098         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8099             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8100             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8101             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8102             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8103             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8104             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8105         </fields>
8106     </class>
8107
8108         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8110                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8111                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8112                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8113                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8114                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8115                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8116                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8117                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8118                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8119                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8120                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8121                 </fields>
8122                 <links>
8123                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8124                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8125                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8126                 </links>
8127         </class>
8128
8129         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
8130                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8131                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8132                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8133                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8134                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8135                 </fields>
8136                 <links>
8137                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8138                 </links>
8139         </class>
8140
8141     <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">
8142         <fields>
8143             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8144             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8145             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8146         </fields>
8147                 <links>
8148                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8149                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8150                 </links>
8151     </class>
8152
8153     <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">
8154         <fields>
8155             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8156             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8157         </fields>
8158                 <links>
8159                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8160                 </links>
8161     </class>
8162
8163     <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">
8164         <fields>
8165             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8166             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8167             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8168         </fields>
8169                 <links>
8170                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8171                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8172                 </links>
8173     </class>
8174
8175     <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">
8176         <fields>
8177             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8178             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8179         </fields>
8180                 <links>
8181                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8182                 </links>
8183     </class>
8184
8185     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8186                 <oils_persist:source_definition>
8187
8188             SELECT  DISTINCT l.*
8189               FROM  action.unfulfilled_hold_loops l
8190                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8191               WHERE l.count = m.max
8192
8193                 </oils_persist:source_definition>
8194         <fields>
8195             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8196             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8197             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8198         </fields>
8199                 <links>
8200                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8201                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8202                 </links>
8203     </class>
8204
8205         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8206                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8207                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8208                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8209                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8210                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8211                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8212                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8213                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8214                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8215                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8216                 </fields>
8217                 <links>
8218                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8219                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8220                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8221                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8222                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8223                 </links>
8224         </class>
8225
8226         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8227                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8228                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8229                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8230                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8231                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8232                 </fields>
8233                 <links>
8234                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8235                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8236                 </links>
8237         </class>
8238
8239         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8240                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8241                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8242                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8243                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8244                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8245                 </fields>
8246                 <links>
8247                 </links>
8248         </class>
8249
8250         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8252                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8253                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8254                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8255                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8256                 </fields>
8257                 <links>
8258                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8259                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8260                 </links>
8261         </class>
8262         
8263         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8264                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8265                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8266                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8267                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8268                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8269                 </fields>
8270                 <links>
8271                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8272                 </links>
8273         </class>
8274         
8275         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
8276                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8277                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8278                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8279                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8280                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8281                 </fields>
8282                 <links>
8283                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8284                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8285                 </links>
8286         </class>
8287
8288         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8289                 <fields oils_persist:primary="name">
8290                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8291                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8292                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8293                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8294                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8295                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8296                 </fields>
8297                 <links>
8298                 </links>
8299         </class>
8300
8301         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8302                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8303                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8304                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8305                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8306                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8307                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8308                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8309                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8310                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8311                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8312                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8313                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8314                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8315                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8316                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8317                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8318                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
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                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8325                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8326                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8327                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8328                 </links>
8329         </class>
8330
8331         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8332                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8333                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8334                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8335                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8336                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8337                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8338                 </fields>
8339                 <links>
8340                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8341                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8342                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8343                 </links>
8344         </class>
8345
8346         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8347                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8348                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8349                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8350                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8351                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8352                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8353                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8354                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8355                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8356                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8357                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8358                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8359                 </fields>
8360                 <links>
8361                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8362                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8363                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8364                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8365                 </links>
8366         </class>
8367
8368         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8369                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8370                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8371                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8372                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8373                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8374                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8375                 </fields>
8376                 <links>
8377                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8378                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8379                 </links>
8380         </class>
8381
8382         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8383                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8384                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8385                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8386                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8387                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8388                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8389                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8390                 </fields>
8391                 <links>
8392                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8393                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8394                 </links>
8395         </class>
8396
8397         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
8398                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8399                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8400                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8401                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8402                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8403                 </fields>
8404                 <links>
8405                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8406                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8407                 </links>
8408         </class>
8409
8410         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
8411                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8412                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8413                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8414                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8415                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8416                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8417                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8418                 </fields>
8419                 <links>
8420                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8421                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8422                 </links>
8423         </class>
8424
8425         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8426                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8427                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8428                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8429                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8430                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8431                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8432                 </fields>
8433                 <links>
8434                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8435                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8436                 </links>
8437         </class>
8438
8439         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
8440                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8441                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8442                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8443                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8444                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8445                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8446                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8447                 </fields>
8448                 <links>
8449                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8450                 </links>
8451         </class>
8452
8453         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
8454                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8455                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8456                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8457                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8458                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8459                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8460                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8461                 </fields>
8462                 <links>
8463                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8464                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8465                 </links>
8466         </class>
8467
8468         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
8469                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8470                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8471                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8472                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8473                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8474                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8475                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8476                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8477                 </fields>
8478                 <links>
8479                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8480                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8481                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8482                 </links>
8483         </class>
8484
8485         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
8486                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8487                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8488                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8489                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8490                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8491                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8492                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8493                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8494                 </fields>
8495                 <links>
8496                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8497                 </links>
8498         </class>
8499
8500         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
8501                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8502                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8503                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8504                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8505                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8506                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8507                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8508                 </fields>
8509                 <links>
8510                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8511                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8512                 </links>
8513         </class>
8514
8515         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
8516                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8517                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8518                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8519                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8520                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8521                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8522                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8523                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8524                 </fields>
8525                 <links>
8526                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8527                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8528                 </links>
8529         </class>
8530
8531         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
8532                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8533                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8534                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8535                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8536                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8537                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8538                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8539                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8540                 </fields>
8541                 <links>
8542                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8543                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8544                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8545                 </links>
8546         </class>
8547
8548         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8549                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8550                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8551                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8552                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8553                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8554                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8555                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8556                 </fields>
8557                 <links>
8558                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8559                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8560                 </links>
8561         </class>
8562
8563         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
8564                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8565                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8566                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8567                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8568                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8569                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8570                 </fields>
8571                 <links>
8572                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8573                 </links>
8574         </class>
8575
8576         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
8577                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8578                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8579                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8580                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8581                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8582                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8583                 </fields>
8584                 <links>
8585                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8586                 </links>
8587         </class>
8588
8589         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
8590                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8591                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8592                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8593                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8594                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8595                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8596                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8597                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8598                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8599                 </fields>
8600                 <links>
8601                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8602                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8603                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8604                 </links>
8605         </class>
8606
8607         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8608                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8609                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8610                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8611                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8612                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8613                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8614                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8615                 </fields>
8616                 <links>
8617                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8618                 </links>
8619         </class>
8620
8621         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8623                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8624                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8625                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8626                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8627                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8628                 </fields>
8629                 <links>
8630                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8631                 </links>
8632         </class>
8633
8634         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
8635                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8636                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8637                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8638                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8639                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8640                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8641                 </fields>
8642                 <links>
8643                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8644                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8645                 </links>
8646         </class>
8647
8648         <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">
8649                 <fields oils_persist:primary="id">
8650                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8651                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8653                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8654                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8655                 </fields>
8656                 <links>
8657                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8658                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8659                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8660                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8661                 </links>
8662         </class>
8663
8664         <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">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8666                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8667                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8668                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8669                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8670                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8671                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8672                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8673                 </fields>
8674                 <links/>
8675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8676                         <actions>
8677                                 <retrieve/>
8678                         </actions>
8679                 </permacrud>
8680         </class>
8681
8682         <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">
8683                 <fields oils_persist:primary="ptype_key">
8684                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8685                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8686                 </fields>
8687                 <links/>
8688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8689                         <actions>
8690                                 <retrieve/>
8691                         </actions>
8692                 </permacrud>
8693         </class>
8694
8695         <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">
8696                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8697                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8698                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8699                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8700                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8701                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8702                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8703                 </fields>
8704                 <links>
8705                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8706                 </links>
8707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8708                         <actions>
8709                                 <retrieve/>
8710                         </actions>
8711                 </permacrud>
8712         </class>
8713
8714         <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">
8715                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8716                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8717                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8718                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8719                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8720                 </fields>
8721                 <links>
8722                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8723                 </links>
8724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8725                         <actions>
8726                                 <retrieve/>
8727                         </actions>
8728                 </permacrud>
8729         </class>
8730
8731         <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">
8732                 <fields oils_persist:primary="code">
8733                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8734                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8735                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8736                 </fields>
8737                 <links/>
8738                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8739                         <actions>
8740                                 <retrieve/>
8741                         </actions>
8742                 </permacrud>
8743         </class>
8744
8745         <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">
8746                 <oils_persist:source_definition>
8747
8748             SELECT  b.id,
8749                     MAX(dcp.edit_date) AS last_delete_date
8750              FROM   biblio.record_entry b
8751                     JOIN asset.call_number cn ON (cn.record = b.id)
8752                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8753              WHERE  NOT b.deleted
8754              GROUP BY b.id
8755              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8756
8757                 </oils_persist:source_definition>
8758                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8759                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8760                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8761                 </fields>
8762                 <links>
8763                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8764                 </links>
8765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8766                         <actions>
8767                                 <retrieve/>
8768                         </actions>
8769                 </permacrud>
8770         </class>
8771
8772         <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">
8773                 <oils_persist:source_definition>
8774
8775             -- -- 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.
8776             -- -- 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
8777             -- -- may not.
8778             -- SELECT
8779             --     bre.id AS "bib_id",
8780             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8781             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8782             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8783             -- FROM (
8784                 SELECT
8785                     y.bre AS "id",
8786                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8787                     y.hold_count AS "hold_count",
8788                     (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"
8789                 FROM (
8790                         SELECT
8791                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8792                             COUNT(*) AS "hold_count"
8793                         FROM action.hold_request h
8794                         WHERE
8795                             cancel_time IS NULL
8796                             AND fulfillment_time IS NULL
8797                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8798                         GROUP BY 1
8799                     )y LEFT JOIN (
8800                         SELECT 
8801                             (SELECT id
8802                                 FROM biblio.record_entry 
8803                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8804                             ) AS "bre", 
8805                             COUNT(*) AS "copy_count"
8806                         FROM asset.copy
8807                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8808                         WHERE copy.holdable 
8809                             AND NOT copy.deleted 
8810                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8811                         GROUP BY 1
8812                     )x ON x.bre = y.bre
8813                 -- )z RIGHT JOIN (
8814                 --     SELECT id
8815                 --     FROM biblio.record_entry
8816                 --     WHERE NOT deleted
8817                 -- )bre ON (z.bib_id = bre.id)
8818                 
8819
8820                 </oils_persist:source_definition>
8821                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8822                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8823                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8824                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8825                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8826                 </fields>
8827                 <links>
8828                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8829                 </links>
8830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831                         <actions>
8832                                 <retrieve/>
8833                         </actions>
8834                 </permacrud>
8835         </class>
8836
8837         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
8838                 <oils_persist:source_definition>
8839             SELECT *,
8840                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
8841                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8842             FROM
8843                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
8844                     FROM
8845                         action.hold_request ahr
8846                         JOIN reporter.hold_request_record rhrr USING (id)
8847                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8848                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8849                     WHERE
8850                         ahr.cancel_time IS NULL
8851                         AND ahr.fulfillment_time IS NULL
8852                     GROUP BY bib_record, pickup_lib
8853                 )x
8854                 JOIN
8855                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8856                     FROM
8857                         action.hold_request ahr
8858                         JOIN reporter.hold_request_record rhrr USING (id)
8859                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8860                     WHERE
8861                         ahr.cancel_time IS NULL
8862                         AND ahr.fulfillment_time IS NULL
8863                     GROUP BY bib_record
8864                 )y
8865                 USING (id)
8866                 </oils_persist:source_definition>
8867                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8868                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8869                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8870                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8871                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8872                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8873                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8874                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8875                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8876                 </fields>
8877                 <links>
8878                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8879                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8880                 </links>
8881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8882                         <actions>
8883                                 <retrieve/>
8884                         </actions>
8885                 </permacrud>
8886         </class>
8887
8888         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
8889                 <oils_persist:source_definition>
8890             SELECT
8891                 ac.id,
8892                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8893                 MAX(actac.xact_start) AS last_circ
8894             FROM asset.copy ac
8895                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8896             GROUP BY ac.id
8897
8898             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8899             --SELECT
8900             --    ac.id,
8901             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8902             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8903             --FROM asset.copy ac
8904             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8905             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8906             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8907                 </oils_persist:source_definition>
8908                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8909                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8910                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8911                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8912                 </fields>
8913                 <links>
8914                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8915                 </links>
8916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8917                         <actions>
8918                                 <retrieve/>
8919                         </actions>
8920                 </permacrud>
8921         </class>
8922
8923         <!-- ********************************************************************************************************************* -->
8924         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8925         <!-- ********************************************************************************************************************* -->
8926         <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">
8927                 <fields oils_persist:primary="id">
8928                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8929                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8930                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8931                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8932                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8933                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8934                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8935                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8936                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8937                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8938                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8939                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8940                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8941                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8942                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8943                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8944                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8945                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8946                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8947                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8948                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8949                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8950                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8951                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8952                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8953                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8954                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8955                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8956                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8957                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8958                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8959                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8960                 </fields>
8961                 <links>
8962                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8963                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8964                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8965                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8966                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8967                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8968                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8969                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8970                 </links>
8971         </class>
8972
8973         <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">
8974                 <fields oils_persist:primary="id">
8975                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8976                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8977                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8978                 </fields>
8979                 <links>
8980                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8981                 </links>
8982         </class>
8983
8984         <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">
8985                 <fields oils_persist:primary="id">
8986                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8987                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8988                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8989                 </fields>
8990                 <links>
8991                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8992                 </links>
8993         </class>
8994
8995         <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">
8996                 <fields oils_persist:primary="id">
8997                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8998
8999                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9000                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9001                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9002
9003                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9004                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9005                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9006
9007                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9008                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9009
9010                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9011                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9012                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9013
9014                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9015                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9016
9017                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9018                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9019                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9020
9021                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9022                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9023                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9024
9025                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9026                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9027                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9028                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9029
9030                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9031                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9032
9033                 </fields>
9034                 <links>
9035                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
9036                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9037                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
9038                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
9039                 </links>
9040         </class>
9041
9042         <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">
9043                 <oils_persist:source_definition>
9044
9045             SELECT
9046                 po.ordering_agency AS ordering_agency,
9047                 po.id AS purchase_order,
9048                 li.id AS lineitem,
9049                 lid.id AS lineitem_detail,
9050                 cpa.id AS claim_policy_action
9051             FROM
9052                 acq.lineitem_detail lid
9053                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
9054                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
9055                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
9056                 JOIN acq.claim_policy_action cpa ON (
9057                     cpa.claim_policy = cp.id
9058
9059                     -- we only care about claim policy actions whose claim
9060                     -- interval we'd reached or exceeded
9061                     AND (NOW() - cpa.action_interval) &gt; po.order_date
9062
9063                     -- filter out all claim policy actions where claim events
9064                     -- have occurred on or after the action's action_interval
9065                     AND NOT EXISTS (
9066                         SELECT 1
9067                         FROM
9068                             acq.claim_event evt
9069                             JOIN acq.claim claim ON (
9070                                 claim.id = evt.claim
9071                                 AND claim.lineitem_detail = lid.id
9072                             )
9073                         WHERE
9074                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
9075                     )
9076                 )
9077             WHERE
9078                 lid.cancel_reason IS NULL
9079                 AND li.cancel_reason IS NULL -- belt/suspenders
9080                 AND po.cancel_reason IS NULL -- belt/suspenders
9081                 AND lid.recv_time IS NULL
9082                 AND po.state = 'on-order'
9083             ORDER BY 1, 2, 3, 4, 5
9084
9085                 </oils_persist:source_definition>
9086                 <fields>
9087                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9088                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9089                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9090                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9091                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
9092                 </fields>
9093                 <links>
9094                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9095                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9096                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9097                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9098                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
9099                 </links>
9100         </class>
9101
9102         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
9103                 <oils_persist:source_definition>
9104
9105             SELECT 
9106                 li.id AS lineitem, 
9107                 (
9108                     SELECT COUNT(lid.id) 
9109                     FROM acq.lineitem_detail lid
9110                     WHERE lineitem = li.id
9111                 ) AS item_count,
9112                 (
9113                     SELECT COUNT(lid.id) 
9114                     FROM acq.lineitem_detail lid
9115                     WHERE recv_time IS NOT NULL AND lineitem = li.id
9116                 ) AS recv_count,
9117                 (
9118                     SELECT COUNT(lid.id) 
9119                     FROM acq.lineitem_detail lid
9120                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
9121                 ) AS cancel_count,
9122                 (
9123                     SELECT COUNT(lid.id) 
9124                     FROM acq.lineitem_detail lid
9125                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9126                     WHERE NOT debit.encumbrance AND lineitem = li.id
9127                 ) AS invoice_count,
9128                 (
9129                     SELECT COUNT(DISTINCT(lid.id)) 
9130                     FROM acq.lineitem_detail lid
9131                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
9132                     WHERE lineitem = li.id
9133                 ) AS claim_count,
9134                 (
9135                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
9136                     FROM acq.lineitem_detail lid
9137                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
9138                 ) AS estimated_amount,
9139                 (
9140                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9141                     FROM acq.lineitem_detail lid
9142                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9143                     WHERE debit.encumbrance AND lineitem = li.id
9144                 ) AS encumbrance_amount,
9145                 (
9146                     SELECT SUM(debit.amount)::NUMERIC(8,2)
9147                     FROM acq.lineitem_detail lid
9148                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9149                     WHERE NOT debit.encumbrance AND lineitem = li.id
9150                 ) AS paid_amount
9151
9152                 FROM acq.lineitem AS li
9153         </oils_persist:source_definition>
9154                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9155                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9156                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9157                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9158                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9159                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9160                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9161                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9162                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9163                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9164                 </fields>
9165                 <links>
9166                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9167                 </links>
9168     </class>
9169
9170
9171         <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">
9172                 <oils_persist:source_definition>
9173
9174                         SELECT  t.*
9175                           FROM  action.transit_copy t
9176                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9177                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9178                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9179
9180                 </oils_persist:source_definition>
9181                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9182                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9183                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9184                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9185                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9186                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9187                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9188                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9189                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9190                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9191                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9192                 </fields>
9193                 <links>
9194                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9195                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9196                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9197                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9198                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9199                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9200                 </links>
9201         </class>
9202
9203     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9204                 <oils_persist:source_definition>
9205
9206         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9207                 SELECT
9208                         cp.id as copy,
9209                         COUNT(circ.id),
9210                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9211                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9212                 FROM
9213                         asset.copy cp
9214                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9215                 GROUP BY 1, 3, 4
9216                 UNION
9217                 SELECT
9218                         cp.id as copy,
9219                         COUNT(circ.id),
9220                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9221                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9222                 FROM
9223                         asset.copy cp
9224                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9225                 GROUP BY 1, 3, 4
9226                 UNION
9227                 SELECT
9228                         id as copy,
9229                         circ_count,
9230                         -1 AS year,
9231                         false as is_renewal
9232                 FROM
9233                         extend_reporter.legacy_circ_count
9234         )x GROUP BY 1, 3, 4
9235
9236                 </oils_persist:source_definition>
9237         <fields>
9238             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9239             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9240             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9241             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9242         </fields>
9243                 <links>
9244                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9245                 </links>
9246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9247                         <actions>
9248                                 <retrieve/>
9249                         </actions>
9250                 </permacrud>
9251     </class>
9252
9253         <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">
9254                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9255                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9256                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9257                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9258                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9259                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9260                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9261                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9262                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9263                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9264                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9265                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9266                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9267                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9268                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9269                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9270                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9271                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9272                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9273                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9274                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9275                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9276                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9277                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9278                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9279                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9280                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9281                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9282                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9283                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9284                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9285                 </fields>
9286                 <links>
9287                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9288                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9289                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9290                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9291                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9292                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9293                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9294                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9295                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9296                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9297                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9298                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9299                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9300                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9301                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9302                 </links>
9303         </class>
9304
9305     <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">
9306         <fields oils_persist:primary="id">
9307             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9308             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9309             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9310             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9311             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9312             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9313             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9314             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9315             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9316             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9317             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9318             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9319             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9320             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9321             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9322             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9323             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9324             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9325             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9326             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9327             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9328             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9329             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9330             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9331             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9332             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9333             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9334             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9335             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9336             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9337             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9338             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9339             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9340             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9341         </fields>
9342         <links>
9343             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9344             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9345             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9346             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9347             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9348         </links>
9349     </class>
9350
9351     <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">
9352         <fields oils_persist:primary="id">
9353             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9354             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9355             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9356             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9357         </fields>
9358         <links>
9359             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9360             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9361         </links>
9362     </class>
9363
9364     <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">
9365         <fields oils_persist:primary="owning_lib">
9366             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9367             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9368             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9369         </fields>
9370         <links>
9371             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9372         </links>
9373     </class>
9374
9375     <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">
9376         <fields oils_persist:primary="id">
9377             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9378             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9379             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9380             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9381             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9382         </fields>
9383         <links>
9384             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9385             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9386             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9387         </links>
9388     </class>
9389
9390     <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">
9391         <fields oils_persist:primary="circ_lib">
9392             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9393             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9394             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9395             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9396         </fields>
9397         <links>
9398             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9399             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9400         </links>
9401     </class>
9402
9403     <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">
9404         <fields oils_persist:primary="id">
9405             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9406             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9407             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9408             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9409             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9410         </fields>
9411         <links>
9412             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9413             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9414             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9415         </links>
9416     </class>
9417
9418     <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">
9419         <fields oils_persist:primary="home_ou">
9420             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9421             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9422             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9423             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9424         </fields>
9425         <links>
9426             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9427             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9428         </links>
9429     </class>
9430         <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">
9431                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9432                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9433                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9434                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9435                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9436                 </fields>
9437                 <links>
9438                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9439                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9440                 </links>
9441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9442                         <actions>
9443                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9444                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9445                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9446                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9447                         </actions>
9448                 </permacrud>
9449         </class>
9450         <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">
9451                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9452                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9453                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9454                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9455                 </fields>
9456                 <links>
9457                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9458                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9459                         </links>
9460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9461                 <actions>
9462                                 <create permission="ADMIN_ACQ_FUND_TAG">
9463                                         <context link="tag" field="owner"/>
9464                                 </create>
9465                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9466                                         <context link="tag" field="owner"/>
9467                                 </retrieve>
9468                                 <update permission="ADMIN_ACQ_FUND_TAG">
9469                                         <context link="tag" field="owner"/>
9470                                 </update>
9471                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9472                                         <context link="tag" field="owner"/>
9473                                 </delete>
9474                         </actions>
9475                 </permacrud>
9476         </class>
9477         <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">
9478                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9479                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9480                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9481                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9482                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9483                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9484                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9485                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9486                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9487                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9488                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9489                 </fields>
9490                 <links>
9491                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9492                 </links>
9493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9494                         <actions>
9495                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9496                                 <retrieve/>
9497                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9498                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9499                         </actions>
9500                 </permacrud>
9501         </class>
9502
9503         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
9504                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9505                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9506                         <field name="date_applied" reporter:datatype="timestamp"/>
9507                         <field name="org" reporter:datatype="org_unit"/>
9508                         <field name="original_value" reporter:datatype="text"/>
9509                         <field name="new_value" reporter:datatype="text"/>
9510                         <field name="field_name" reporter:datatype="link"/>
9511                 </fields>
9512                 <links>
9513                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9514                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9515                 </links>
9516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9517                         <actions>
9518                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9519                                 <retrieve/>
9520                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9521                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9522                         </actions>
9523                 </permacrud>
9524         </class>
9525         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9528                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9529                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9530                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9531                 </fields>
9532                 <links>
9533                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9534                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
9535                 </links>
9536         </class>
9537         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
9538                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
9539                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9540                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
9541                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
9542                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9543                 </fields>
9544                 <links>
9545                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
9546                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
9547                 </links>
9548         </class>
9549
9550
9551         <!-- ********************************************************************************************************************* -->
9552
9553 </IDL>
9554
9555 <!--
9556     vim:noet:ts=4:sw=4:
9557 -->