]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
adding table sql and IDL entries for the staging schema. schema has multiple applica...
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115
116         <!-- Actually in the DB -->
117         <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">
118                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
119                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
120                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
121                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
122                 </fields>
123                 <links>
124                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
125                 </links>
126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
127                         <actions>
128                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
129                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
130                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
131                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
132                         </actions>
133                 </permacrud>
134         </class>
135
136         <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 Attribute Definition">
137                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
138                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
139                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
140                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
141                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
142                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
143                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
144                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
145                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
146                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
147                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
148                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
149                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
150                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
151                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
152                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
153                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
154                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
155                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
156                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
157                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
158                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
159                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
160                 </fields>
161                 <links>
162                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
163                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
164                 </links>
165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
166                         <actions>
167                                 <create permission="CREATE_IMPORT_ITEM">
168                     <context link="definition" field="owner"/>
169                                 </create>
170                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
171                     <context link="definition" field="owner"/>
172                                 </retrieve>
173                                 <update permission="UPDATE_IMPORT_ITEM">
174                     <context link="definition" field="owner"/>
175                                 </update>
176                                 <delete permission="DELETE_IMPORT_ITEM">
177                     <context link="definition" field="owner"/>
178                                 </delete>
179                         </actions>
180                 </permacrud>
181         </class>
182
183         <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">
184                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
185                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
186                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
187                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
188                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
189                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
190                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
191                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
192                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
193                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
194                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
195                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
196                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
197                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
198                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
199                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
200                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
201                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
202                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
203                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
204                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
205                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
206                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
207                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
208                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
209                 </fields>
210                 <links>
211                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
212                 </links>
213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
214                         <actions>
215                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
216                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
217                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
218                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
219                         </actions>
220                 </permacrud>
221         </class>
222
223         <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">
224                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
225                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
226                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
227                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
228                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
229                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
230                 </fields>
231                 <links>
232                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
233                 </links>
234                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
235                         <actions>
236                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
237                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
238                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
239                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <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">
245                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
246                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
247                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
248                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
249                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
250                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
251                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
252                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
253                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
254                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="text"/>
255                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="text"/>
256                 </fields>
257                 <links>
258                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
259                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
260                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
261             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
262             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
263                 </links>
264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
265                         <actions>
266                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
267                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
268                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
269                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
270                         </actions>
271                 </permacrud>
272         </class>
273
274         <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">
275                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
276                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
277                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
278                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
279                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
280                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
281                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
282                 </fields>
283                 <links/>
284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
285                         <actions>
286                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
287                 <retrieve/>
288                 <!--
289                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
290                 -->
291                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
292                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
293                         </actions>
294                 </permacrud>
295         </class>
296
297         <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">
298                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
299                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
300                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
301                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
302                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
303                 </fields>
304                 <links>
305                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
306                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
307                 </links>
308                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
309                         <actions>
310                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
311                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
312                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
313                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
314                         </actions>
315                 </permacrud>
316         </class>
317
318         <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">
319                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
320                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
321                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
322                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
323                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
324                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
325                 </fields>
326                 <links>
327                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
328                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
329                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
330                 </links>
331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
332                         <actions>
333                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
334                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
335                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
336                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
337                         </actions>
338                 </permacrud>
339         </class>
340
341         <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">
342                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
343                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
346                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
347                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
355                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
356                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
357                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
364                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
365                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
366                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
367                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
368                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
369                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
370                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
371                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="text"/>
372                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="text"/>
373                 </fields>
374                 <links>
375                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
376                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
377             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
378             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
379                 </links>
380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
381                         <actions>
382                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
383                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
384                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
385                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
386                         </actions>
387                 </permacrud>
388         </class>
389
390         <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">
391                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
393                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
395                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
396                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
397                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
398                 </fields>
399                 <links/>
400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
401                         <actions>
402                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
403                 <retrieve/>
404                 <!--
405                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
406                 -->
407                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
408                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
409                         </actions>
410                 </permacrud>
411         </class>
412
413         <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">
414                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
415                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
416                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
417                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
418                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
419                 </fields>
420                 <links>
421                         <link field="record" reltype="has_a" key="id" map="" class="vaqr"/>
422                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
423                 </links>
424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
425                         <actions>
426                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
427                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
428                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
429                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
430                         </actions>
431                 </permacrud>
432         </class>
433
434         <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">
435                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
436                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
437                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
438                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
439                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
440                 </fields>
441                 <links>
442                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
443                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
444                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
445                 </links>
446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
447                         <actions>
448                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
449                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
450                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
451                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
452                         </actions>
453                 </permacrud>
454         </class>
455
456
457         <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">
458                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
459                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
460                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
461                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
462                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
463                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
464                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
465                 </fields>
466                 <links>
467                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
468                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
469                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
470                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
471                 </links>
472         </class>
473
474     <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">
475         <fields oils_persist:primary="name">
476             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
477             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
478             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
479             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
480             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
481             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
482             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
483             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
484             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
485         </fields>
486         <links>
487             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
488         </links>
489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
490             <actions>
491                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
492                 <retrieve/>
493                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
494                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
495             </actions>
496         </permacrud>
497     </class>
498
499     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
500         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
501             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
502             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
503             <field reporter:label="Name" name="name" reporter:datatype="text"/>
504             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
505             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
506             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
507             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
508         </fields>
509         <links>
510             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
511         </links>
512     </class>
513
514         <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">
515                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
516                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
517                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
518                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
519                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
520                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
521                         <field reporter:label="Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
522                 </fields>
523                 <links>
524             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
525             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
526                 </links>
527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
528                         <actions>
529                                 <retrieve/>
530                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
531                         </actions>
532                 </permacrud>
533         </class>
534
535         <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">
536                 <fields oils_persist:primary="key">
537                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
538                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
539                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
540                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
541                 </fields>
542                 <links/>
543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
544                         <actions>
545                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
546                                 <retrieve/>
547                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
548                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
549                         </actions>
550                 </permacrud>
551         </class>
552
553         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
554                 <fields oils_persist:primary="module">
555                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
556                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
557                 </fields>
558                 <links/>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="module">
563                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
564                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
565                 </fields>
566                 <links/>
567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
568                         <actions>
569                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
570                                 <retrieve/>
571                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
572                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
573                         </actions>
574                 </permacrud>
575         </class>
576
577         <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">
578                 <fields oils_persist:primary="module">
579                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
580                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
581                 </fields>
582                 <links/>
583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
584                         <actions>
585                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
586                                 <retrieve/>
587                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
588                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
589                         </actions>
590                 </permacrud>
591         </class>
592
593         <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">
594                 <fields oils_persist:primary="module">
595                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
596                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
597                 </fields>
598                 <links/>
599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
600                         <actions>
601                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
602                                 <retrieve/>
603                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
604                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
605                         </actions>
606                 </permacrud>
607         </class>
608
609         <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">
610                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
611                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
612                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
613                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
614                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
615                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
616                 </fields>
617                 <links>
618                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
619                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
620                 </links>
621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
622                         <actions>
623                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
624                     <context link="event_def" field="owner"/>
625                 </create>
626                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
627                     <context link="event_def" field="owner"/>
628                 </retrieve>
629                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
630                     <context link="event_def" field="owner"/>
631                 </update>
632                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
633                     <context link="event_def" field="owner"/>
634                 </delete>
635                         </actions>
636                 </permacrud>
637         </class>
638
639         <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">
640                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
641                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
642                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
643                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
644                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
645                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
646                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
647                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
648                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
649                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
650                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
651                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
652                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
653                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
654                         <field reporter:label="Environmet Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
655                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
656                 </fields>
657                 <links>
658                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
659                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
660                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
661                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
662                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
663                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
664                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
665                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
666                 </links>
667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
668                         <actions>
669                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
670                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
671                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
672                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
678                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
679                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
681                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
682                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
683                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
684                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
685                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
686                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
687                         <field reporter:label="State" name="state" reporter:datatype="text"/>
688                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
689                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
690                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
694                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
695                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
696                 </links>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
701                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
703                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
704                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
705                 </fields>
706                 <links>
707                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
708                 </links>
709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
710                         <actions>
711                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
712                     <context link="event_def" field="owner"/>
713                 </create>
714                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
715                     <context link="event_def" field="owner"/>
716                 </retrieve>
717                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
718                     <context link="event_def" field="owner"/>
719                 </update>
720                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
721                     <context link="event_def" field="owner"/>
722                 </delete>
723                         </actions>
724                 </permacrud>
725         </class>
726
727         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
728                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
729                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
730                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
731                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
732                 </fields>
733                 <links>
734                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
735                 </links>
736         </class>
737
738         <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">
739                 <fields oils_persist:primary="code">
740                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
741                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
742                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
743                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
744                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
745                 </fields>
746                 <links/>
747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
748             <actions>
749                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
750                 <retrieve/>
751                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
752                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
753             </actions>
754         </permacrud>
755         </class>
756
757         <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">
758                 <fields oils_persist:primary="code">
759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
761                 </fields>
762                 <links/>
763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
764             <actions>
765                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
766                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
767                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
768                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
769             </actions>
770         </permacrud>
771         </class>
772
773         <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">
774                 <fields oils_persist:primary="code">
775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
777                 </fields>
778                 <links/>
779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
780             <actions>
781                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
782                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
783                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
784                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
785             </actions>
786         </permacrud>
787         </class>
788
789         <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">
790                 <fields oils_persist:primary="code">
791                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
792                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
793                 </fields>
794                 <links/>
795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
796             <actions>
797                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
798                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
799                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
800                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
801             </actions>
802         </permacrud>
803         </class>
804
805         <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">
806                 <fields oils_persist:primary="code">
807                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
808                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
809                 </fields>
810                 <links/>
811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
812             <actions>
813                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
814                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
815                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
816                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
817             </actions>
818         </permacrud>
819         </class>
820
821         <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">
822                 <fields oils_persist:primary="code">
823                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
824                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
825                 </fields>
826                 <links/>
827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
828             <actions>
829                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
830                 <retrieve/>
831                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
832                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
833             </actions>
834         </permacrud>
835         </class>
836
837         <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">
838                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
839                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
840                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
841                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
842                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
843                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
844                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
845                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
846                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
847                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
848                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
849                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
850                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
851                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
852                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
853                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
854                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
855                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
856                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
857                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
858                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
859                 </fields>
860                 <links>
861                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
863                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
864                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
866                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
867                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
868                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
869                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
870                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
871                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
872                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
873             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
874                 </links>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
878                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
879                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
880                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
881             </actions>
882         </permacrud>
883         </class>
884
885         <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">
886                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
887                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
888                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
889                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
890                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
891                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
892                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
893                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
894                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
895                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
896                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
897                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
898                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
899                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
900                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
901                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
902                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
903                 </fields>
904                 <links>
905                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
906                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
907                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
908                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
909                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
910                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
911                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
912                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
913                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
918                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
919                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
920                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
927                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
928                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
929                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
930                 </fields>
931                 <links>
932                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
933                 </links>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
937                     <context link="matchpoint" field="org_unit"/>
938                 </create>
939                 <retrieve/>
940                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
941                     <context link="matchpoint" field="org_unit"/>
942                 </update>
943                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
944                     <context link="matchpoint" field="org_unit"/>
945                 </delete>
946             </actions>
947         </permacrud>
948         </class>
949
950         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
951                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
952                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
953                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
954                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
955                 </fields>
956                 <links>
957                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
958                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
959                 </links>
960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961             <actions>
962                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
963                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
964                 </create>
965                 <retrieve/>
966                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
967                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
968                 </update>
969                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
970                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
971                 </delete>
972             </actions>
973         </permacrud>
974         </class>
975
976         <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">
977                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
978                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
979                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
980                 </fields>
981                 <links/>
982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
983             <actions>
984                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
985                 <retrieve/>
986                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
987                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
988             </actions>
989         </permacrud>
990         </class>
991
992         <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">
993                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
994                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
995                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
996                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
997                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
998                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
999                 </fields>
1000                 <links>
1001                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1002                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1003                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1004                 </links>
1005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1006             <actions>
1007                 <create permission="ADMIN_SURVEY">
1008                     <context link="survey" field="owner"/>
1009                 </create>
1010                 <retrieve/>
1011                 <update permission="ADMIN_SURVEY">
1012                     <context link="survey" field="owner"/>
1013                 </update>
1014                 <delete permission="ADMIN_SURVEY">
1015                     <context link="survey" field="owner"/>
1016                 </delete>
1017             </actions>
1018         </permacrud>
1019         </class>
1020         <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">
1021                 <fields oils_persist:primary="id" oils_persist:sequence="">
1022                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1023                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1024                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1025                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1026                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1027                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1028                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1029                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1030                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1031                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1032                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1033                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1034                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1035                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1036                 </fields>
1037                 <links>
1038                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1039                 </links>
1040         </class>
1041         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1043                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1044                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1045                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1046                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1047                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1048                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1049                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1050                 </fields>
1051                 <links>
1052                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1053                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1054                 </links>
1055         </class>
1056         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1058                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1059                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
1060                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1061                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1062                 </fields>
1063                 <links>
1064                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1065                 </links>
1066         </class>
1067         <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">
1068                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1069                         <field name="field" reporter:datatype="link"/>
1070                         <field name="id" reporter:datatype="id" />
1071                         <field name="source" reporter:datatype="link"/>
1072                         <field name="value" reporter:datatype="text"/>
1073                 </fields>
1074                 <links>
1075                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1076                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1077                 </links>
1078         </class>
1079         <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">
1080                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1081                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1082                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1083                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1084                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1085                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1086                 </fields>
1087                 <links>
1088                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1089                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1090                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1091                 </links>
1092         </class>
1093         <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">
1094                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1095                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1096                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1097                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1098                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1099                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1100                 </fields>
1101                 <links>
1102                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1103                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1104                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1105                 </links>
1106         </class>
1107         <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">
1108                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1109                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1110                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1111                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1112                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1113                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1114                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1115                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1116                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1117                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1118                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1119                 </fields>
1120                 <links>
1121                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1122                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1123                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1124                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1125                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1126                 </links>
1127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1128             <actions>
1129                 <create permission="TRANSIT_COPY" context_field="owner">
1130                     <context link="target_copy" field="circ_lib"/>
1131                 </create>
1132                 <retrieve/>
1133                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1134                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1135             </actions>
1136         </permacrud>
1137         </class>
1138         <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">
1139                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1140                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1141                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1142                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1143                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1144                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1145                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1146                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1147                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1148                 </fields>
1149                 <links>
1150                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1151                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1152                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1153                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1154                 </links>
1155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1156             <actions>
1157                 <create permission="ADMIN_SURVEY">
1158                     <context link="survey" field="owner"/>
1159                 </create>
1160                 <retrieve/>
1161                 <update permission="ADMIN_SURVEY">
1162                     <context link="survey" field="owner"/>
1163                 </update>
1164                 <delete permission="ADMIN_SURVEY">
1165                     <context link="survey" field="owner"/>
1166                 </delete>
1167             </actions>
1168         </permacrud>
1169         </class>
1170         <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">
1171                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1172                         <field name="bucket" />
1173                         <field name="id" reporter:datatype="id" />
1174                         <field name="target_copy" reporter:datatype="link"/>
1175                         <field name="create_time" reporter:datatype="timestamp" />
1176                         <field name="pos" reporter:datatype="int" />
1177                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1178                 </fields>
1179                 <links>
1180                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1181                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1182             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1183                 </links>
1184         </class>
1185         <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">
1186                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1187                         <field name="id" reporter:datatype="id" />
1188                         <field name="item" reporter:datatype="link"/>
1189                         <field name="note" reporter:datatype="text" />
1190                 </fields>
1191                 <links>
1192                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1193                 </links>
1194         </class>
1195         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1196                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1197                         <field name="active" reporter:datatype="bool"/>
1198                         <field name="arn_source" />
1199                         <field name="arn_value" />
1200                         <field name="create_date" reporter:datatype="timestamp"/>
1201                         <field name="creator" />
1202                         <field name="deleted" reporter:datatype="bool"/>
1203                         <field name="edit_date" reporter:datatype="timestamp"/>
1204                         <field name="editor" />
1205                         <field name="id" reporter:datatype="id" />
1206                         <field name="last_xact_id" />
1207                         <field name="marc" />
1208                         <field name="source" />
1209                         <field name="fixed_fields" oils_persist:virtual="true" />
1210                         <field name="notes" oils_persist:virtual="true" />
1211                 </fields>
1212                 <links>
1213                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1214                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1215                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1216                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1217                 </links>
1218         </class>
1219         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1220                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1221                         <field name="char_encoding" />
1222                         <field name="id" />
1223                         <field name="record" />
1224                         <field name="record_status" />
1225                 </fields>
1226                 <links>
1227                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1228                 </links>
1229         </class>
1230         <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">
1231                 <fields oils_persist:primary="code" oils_persist:sequence="">
1232                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1233                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1234                 </fields>
1235                 <links/>
1236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1237             <actions>
1238                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1239                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1240                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1241                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1242             </actions>
1243         </permacrud>
1244         </class>
1245         <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">
1246                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1247                         <field name="accepting_usr" />
1248                         <field name="amount" reporter:datatype="money" />
1249                         <field name="amount_collected" reporter:datatype="money" />
1250                         <field name="approval_code" reporter:datatype="text"/>
1251                         <field name="cash_drawer" reporter:datatype="link"/>
1252                         <field name="cc_number" reporter:datatype="text"/>
1253                         <field name="cc_type" reporter:datatype="text"/>
1254                         <field name="expire_month" reporter:datatype="int" />
1255                         <field name="expire_year" reporter:datatype="int" />
1256                         <field name="id" reporter:datatype="id" />
1257                         <field name="note" reporter:datatype="text"/>
1258                         <field name="payment_ts" reporter:datatype="timestamp"/>
1259                         <field name="xact" reporter:datatype="link"/>
1260                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1261                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1262                 </fields>
1263                 <links>
1264                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1265                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1266                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1267                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1268                 </links>
1269         </class>
1270         <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">
1271                 <fields oils_persist:primary="name">
1272                         <field name="field_class" />
1273                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1274                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1275                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1276                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1277                 </fields>
1278                 <links/>
1279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1280             <actions>
1281                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1282                 <retrieve/>
1283                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1284                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1285             </actions>
1286         </permacrud>
1287         </class>
1288         <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">
1289                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1290                         <field name="field_class" />
1291                         <field name="id" reporter:datatype="id" />
1292                         <field name="name" reporter:datatype="text"/>
1293                         <field name="xpath" reporter:datatype="text"/>
1294                         <field name="weight" reporter:datatype="int" />
1295                         <field name="format" reporter:datatype="link"/>
1296                         <field name="search_field" reporter:datatype="bool" />
1297                         <field name="facet_field" reporter:datatype="bool" />
1298                 </fields>
1299                 <links/>
1300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1301             <actions>
1302                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1303                 <retrieve/>
1304                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1305                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1306             </actions>
1307         </permacrud>
1308         </class>
1309         <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">
1310                 <fields oils_persist:primary="code" oils_persist:sequence="">
1311                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1312                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1313                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1314                 </fields>
1315                 <links/>
1316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1317             <actions>
1318                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1319                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1320                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1321                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1322             </actions>
1323         </permacrud>
1324         </class>
1325         <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">
1326                 <fields oils_persist:primary="code" oils_persist:sequence="">
1327                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1328                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1329                 </fields>
1330                 <links/>
1331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332             <actions>
1333                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1334                 <retrieve/>
1335                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1336                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1337             </actions>
1338         </permacrud>
1339         </class>
1340         <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">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1342                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1343                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1345                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1346                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1347                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1348                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1349                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1350                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1351                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1352                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1353                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1354                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1355                 </fields>
1356                 <links>
1357                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1358                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1359                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1360                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1361                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1362                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1363                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1364                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1365                 </links>
1366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1367             <actions>
1368                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1369                 <retrieve/>
1370                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1371                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1372             </actions>
1373         </permacrud>
1374         </class>
1375         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1376                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1377                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1378                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1379                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1380                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1381                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1382                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1383                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1384                 </fields>
1385                 <links>
1386                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1387                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1388         </links>
1389         </class>
1390         <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">
1391                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1393                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1394                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1395                 </fields>
1396                 <links>
1397                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1398                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1399                 </links>
1400         </class>
1401         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1402                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1403                         <field name="id" reporter:datatype="id" />
1404                         <field name="value" oils_persist:i18n="true" />
1405                 </fields>
1406                 <links/>
1407         </class>
1408         <class id="mous" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
1409                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1410                         <field name="balance_owed" reporter:datatype="money" />
1411                         <field name="total_owed" reporter:datatype="money" />
1412                         <field name="total_paid" reporter:datatype="money" />
1413                         <field name="usr" reporter:datatype="link"/>
1414                 </fields>
1415                 <links/>
1416         </class>
1417         <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">
1418                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1419                         <field name="collector" />
1420                         <field name="enter_time" reporter:datatype="timestamp"/>
1421                         <field name="id" reporter:datatype="id" />
1422                         <field name="location" reporter:datatype="link"/>
1423                         <field name="usr" reporter:datatype="link"/>
1424                 </fields>
1425                 <links>
1426                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1427                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1428                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1429                 </links>
1430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1431             <actions>
1432                 <create permission="money.collections_tracker.create" context_field="location"/>
1433                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1434                 <delete permission="money.collections_tracker.create" context_field="location"/>
1435             </actions>
1436         </permacrud>
1437         </class>
1438         <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">
1439                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1440                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1441                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1442                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1443                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1444                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1445                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1446                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1447                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1448                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1449                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1450                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1451                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1452                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1453                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1454                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1455                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1456                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1457                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1458                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1459                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1460                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1461                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1462                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1463                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1464                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1465                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1466                 </fields>
1467                 <links>
1468                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1469                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1470                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1471                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1472                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1473                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1474                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1475                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1476                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1477                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1478                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1479                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1480                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1481                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1482                 </links>
1483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1484             <actions>
1485                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1486                 <retrieve/>
1487                 <update permission="UPDATE_MARC" global_required="true"/>
1488             </actions>
1489         </permacrud>
1490         </class>
1491         <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">
1492                 <fields oils_persist:primary="id" oils_persist:sequence="">
1493                         <field name="dow_0_close" />
1494                         <field name="dow_0_open" />
1495                         <field name="dow_1_close" />
1496                         <field name="dow_1_open" />
1497                         <field name="dow_2_close" />
1498                         <field name="dow_2_open" />
1499                         <field name="dow_3_close" />
1500                         <field name="dow_3_open" />
1501                         <field name="dow_4_close" />
1502                         <field name="dow_4_open" />
1503                         <field name="dow_5_close" />
1504                         <field name="dow_5_open" />
1505                         <field name="dow_6_close" />
1506                         <field name="dow_6_open" />
1507                         <field name="id" reporter:datatype="id" />
1508                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1509                 </fields>
1510                 <links>
1511                         <link field="org_unit" reltype="might_have" key="id" map="" class="aou"/>
1512                 </links>
1513         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1514             <actions>
1515                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="org_unit"/>
1516                 <retrieve/>
1517                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="org_unit"/>
1518                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="org_unit"/>
1519             </actions>
1520         </permacrud>
1521         </class>
1522         <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">
1523                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1524                         <field name="close_end" reporter:datatype="timestamp" />
1525                         <field name="close_start" reporter:datatype="timestamp" />
1526                         <field name="id" reporter:datatype="id" />
1527                         <field name="org_unit" reporter:datatype="org_unit"/>
1528                         <field name="reason" reporter:datatype="text"/>
1529                 </fields>
1530                 <links>
1531                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1532                 </links>
1533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1534             <actions>
1535                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1536                 <retrieve/>
1537                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1538                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1539             </actions>
1540         </permacrud>
1541         </class>
1542         <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">
1543                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1544                         <field name="extended" reporter:datatype="interval"/>
1545                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1546                         <field name="max_renewals" reporter:datatype="int" />
1547                         <field name="name" reporter:datatype="text"/>
1548                         <field name="normal" reporter:datatype="interval"/>
1549                         <field name="shrt" reporter:datatype="interval"/>
1550                 </fields>
1551                 <links>
1552                 </links>
1553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1554             <actions>
1555                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1556                 <retrieve/>
1557                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1558                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1559             </actions>
1560         </permacrud>
1561         </class>
1562         <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">
1563                 <fields oils_persist:primary="id" oils_persist:sequence="">
1564                         <field name="balance_owed" reporter:datatype="money"/>
1565                         <field name="id" reporter:datatype="id" />
1566                         <field name="last_billing_note" reporter:datatype="text"/>
1567                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1568                         <field name="last_billing_type" reporter:datatype="text"/>
1569                         <field name="last_payment_note" reporter:datatype="text"/>
1570                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1571                         <field name="last_payment_type" reporter:datatype="text"/>
1572                         <field name="total_owed" reporter:datatype="money"/>
1573                         <field name="total_paid" reporter:datatype="money"/>
1574                         <field name="usr" reporter:datatype="link"/>
1575                         <field name="xact_finish" reporter:datatype="timestamp" />
1576                         <field name="xact_start" reporter:datatype="timestamp" />
1577                         <field name="xact_type" reporter:datatype="text"/>
1578                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1579                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1580                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1581                         <field name="billing_location" reporter:datatype="link"/>
1582                 </fields>
1583                 <links>
1584                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1585                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1586                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1587                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1588                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1589                 </links>
1590         </class>
1591         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1592                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1593                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1594                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1595                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1596                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1597                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1598                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1599                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1600                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1601                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1602                         <field name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1603                         <field name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1604                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1605                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1606                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1607                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1608                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1609                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1610                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1611                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1612                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1613                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1614                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1615                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1616                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1617                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1618                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1619                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1620                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1621                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1622                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1623                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1624                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1625                         <field name="last_xact_id" reporter:datatype="text"/>
1626                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1627                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1628                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1629                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1630                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1631                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1632                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1633                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1634                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1635                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1636                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1637                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1638                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1639                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1640                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1641                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1642                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1643                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1644                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1645                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1646                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1647                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1648                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1649                 </fields>
1650                 <links>
1651                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1652                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1653                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1654                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1655                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1656                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1657                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1658                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1659                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1660                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1661                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1662                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1663                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1664                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1665                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1666                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1667                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1668                         <link reporter:label="Billable Transactions" field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1669                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1670                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1671                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1672                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1673                         <link reporter:label="Check-ins Performed as Staff" field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1674                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1675                         <link reporter:label="Circulations Performed as Staff" field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1676                 </links>
1677         </class>
1678         <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">
1679                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1680                         <field name="id" />
1681                         <field name="name"  reporter:datatype="text"/>
1682                         <field name="org_unit" reporter:datatype="org_unit"/>
1683                         <field name="value"  reporter:datatype="text"/>
1684                 </fields>
1685                 <links>
1686                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1687                 </links>
1688         </class>
1689         <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">
1690                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1691                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1692                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1693                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1694                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1695                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1696                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1697                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1698                 </fields>
1699                 <links>
1700                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1701                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1702                 </links>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_COPY_NOTE">
1706                     <context link="owning_copy" field="circ_lib"/>
1707                 </create>
1708                 <retrieve permission="VIEW_COPY_NOTES">
1709                     <context link="owning_copy" field="circ_lib"/>
1710                 </retrieve>
1711                 <update permission="UPDATE_COPY_NOTE">
1712                     <context link="owning_copy" field="circ_lib"/>
1713                 </update>
1714                 <delete permission="DELETE_COPY_NOTE">
1715                     <context link="owning_copy" field="circ_lib"/>
1716                 </delete>
1717             </actions>
1718         </permacrud>
1719         </class>
1720         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1721                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1722                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1723                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1724                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1725                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1726                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1727                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1728                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1729                 </fields>
1730                 <links>
1731                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1732                 </links>
1733         </class>
1734         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1735                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1736                         <field name="fingerprint"  reporter:datatype="text"/>
1737                         <field name="id" reporter:datatype="id" />
1738                         <field name="master_record" reporter:datatype="link"/>
1739                         <field name="mods"  reporter:datatype="text"/>
1740                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1741                 </fields>
1742                 <links>
1743                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1744                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1745                 </links>
1746         </class>
1747         <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">
1748                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1749                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1750                         <field name="name"  reporter:datatype="text"/>
1751                 </fields>
1752                 <links/>
1753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1754             <actions>
1755                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1756                 <retrieve/>
1757                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1758                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1759             </actions>
1760         </permacrud>
1761         </class>
1762         <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">
1763                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
1764                         <field name="code"  reporter:datatype="text"/>
1765                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
1766                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
1767                 </fields>
1768                 <links/>
1769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1770             <actions>
1771                 <create permission="CREATE_PERM" global_required="true"/>
1772                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
1773                 <update permission="UPDATE_PERM" global_required="true"/>
1774                 <delete permission="DELETE_PERM" global_required="true"/>
1775             </actions>
1776         </permacrud>
1777         </class>
1778         <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">
1779                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
1780                         <field name="id" reporter:datatype="id" />
1781                         <field name="metarecord" reporter:datatype="link"/>
1782                         <field name="source" reporter:datatype="link"/>
1783                 </fields>
1784                 <links>
1785                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1786                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
1787                 </links>
1788         </class>
1789         <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">
1790                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
1791                         <field name="field" reporter:datatype="link"/>
1792                         <field name="id" reporter:datatype="id" />
1793                         <field name="source" reporter:datatype="link"/>
1794                         <field name="value"  reporter:datatype="text"/>
1795                 </fields>
1796                 <links>
1797                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1798                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1799                 </links>
1800         </class>
1801         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
1802                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1803                         <field name="accepting_usr" reporter:datatype="link"/>
1804                         <field name="amount" reporter:datatype="money" />
1805                         <field name="amount_collected" reporter:datatype="money" />
1806                         <field name="cash_drawer" reporter:datatype="link"/>
1807                         <field name="id" reporter:datatype="id" />
1808                         <field name="note"  reporter:datatype="text"/>
1809                         <field name="payment_ts" reporter:datatype="timestamp"/>
1810                         <field name="xact" reporter:datatype="link"/>
1811                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1812                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1813                 </fields>
1814                 <links>
1815                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1816                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1817                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1818                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1819                 </links>
1820         </class>
1821         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
1822                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1823                         <field name="accepting_usr" reporter:datatype="link"/>
1824                         <field name="amount" reporter:datatype="money" />
1825                         <field name="amount_collected" reporter:datatype="money" />
1826                         <field name="id" reporter:datatype="id" />
1827                         <field name="note"  reporter:datatype="text"/>
1828                         <field name="payment_ts" reporter:datatype="timestamp"/>
1829                         <field name="xact" reporter:datatype="link"/>
1830                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
1831                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1832                 </fields>
1833                 <links>
1834                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1835                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1836                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1837                 </links>
1838         </class>
1839         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
1840                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
1841                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
1842                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1843                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1844                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
1845                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1846                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
1847                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
1848                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1849                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
1850                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
1851                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
1852                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
1853                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1854                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
1855                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
1856                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
1857                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
1858                 </fields>
1859                 <links>
1860                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1861                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
1862                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
1863                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1864                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
1865                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
1866                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
1867                 </links>
1868         </class>
1869
1870         <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">
1871                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
1872                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1873                         <field name="name"  reporter:datatype="text"/>
1874                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
1875                         <field name="block_list" reporter:datatype="text"/>
1876                 </fields>
1877                 <links/>
1878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1879             <actions>
1880                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1881                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
1882                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1883                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
1884             </actions>
1885         </permacrud>
1886         </class>
1887         <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">
1888                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
1889                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
1890                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
1891                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
1892                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
1893                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
1894                 </fields>
1895                 <links>
1896                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
1897                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1898                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1899         </links>
1900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1901             <actions>
1902                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1903                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1904                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1905                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
1906             </actions>
1907         </permacrud>
1908         </class>
1909         <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">
1910                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
1911                         <field name="holdable" reporter:datatype="bool"/>
1912                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1913                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
1914                         <field name="opac_visible" reporter:datatype="bool"/>
1915                 </fields>
1916                 <links/>
1917         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1918             <actions>
1919                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
1920                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
1921                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
1922                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
1923             </actions>
1924         </permacrud>
1925         </class>
1926         <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">
1927                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
1928                         <field name="id" reporter:datatype="id" reporter:label="ID" />
1929                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
1930                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
1931                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
1932                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
1933                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
1934                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
1935                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
1936                 </fields>
1937                 <links>
1938                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1939                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1940                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1941                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
1942                 </links>
1943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1944                         <actions>
1945                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
1946                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
1947                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
1948                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
1949                         </actions>
1950                 </permacrud>
1951         </class>
1952         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
1953                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
1954                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
1955                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
1956                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
1957                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
1958                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
1959                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
1960                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
1961                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
1962                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
1963                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1964                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
1965                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
1966                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
1967                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
1968                 </fields>
1969                 <links>
1970                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1971                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
1972                 </links>
1973         </class>
1974         <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">
1975                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
1976                         <field name="call_number" />
1977                         <field name="create_date" reporter:datatype="timestamp"/>
1978                         <field name="creator" reporter:datatype="link"/>
1979                         <field name="id" reporter:datatype="id" />
1980                         <field name="pub" reporter:datatype="bool"/>
1981                         <field name="title"  reporter:datatype="text"/>
1982                         <field name="value"  reporter:datatype="text"/>
1983                 </fields>
1984                 <links>
1985                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1986                 </links>
1987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1988             <actions>
1989                 <create permission="CREATE_VOLUME_NOTE">
1990                     <context link="call_number" field="owning_lib"/>
1991                 </create>
1992                 <retrieve permission="VIEW_VOLUME_NOTES">
1993                     <context link="call_number" field="owning_lib"/>
1994                 </retrieve>
1995                 <update permission="UPDATE_VOLUME_NOTE">
1996                     <context link="call_number" field="owning_lib"/>
1997                 </update>
1998                 <delete permission="DELETE_VOLUME_NOTE">
1999                     <context link="call_number" field="owning_lib"/>
2000                 </delete>
2001             </actions>
2002         </permacrud>
2003         </class>
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2006                         <field name="create_date" reporter:datatype="timestamp"/>
2007                         <field name="creator" reporter:datatype="link"/>
2008                         <field name="edit_date" reporter:datatype="timestamp"/>
2009                         <field name="editor" reporter:datatype="link"/>
2010                         <field name="id" reporter:datatype="id" />
2011                         <field name="record" reporter:datatype="link"/>
2012                         <field name="value" reporter:datatype="text"/>
2013                 </fields>
2014                 <links>
2015                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2016                 </links>
2017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2018             <actions>
2019                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2020                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2021                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2022                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2023             </actions>
2024         </permacrud>
2025         </class>
2026         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2028                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2029                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2030                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2031                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2032                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2033                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2034                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2035                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2036                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2037                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2038                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2039                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2040                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2041                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2042                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2043                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2044                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2045                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2046                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2047                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2048                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2049                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2050                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2051                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2052                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2053                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2054                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2055                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2056                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2057                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2058                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2059                 </fields>
2060                 <links>
2061                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2062                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2063                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2064                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2065                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2067                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2068                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2069                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2070                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2071                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2072                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2073                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2074                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2075                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2076                 </links>
2077         </class>
2078         <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">
2079                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2080                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2081                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2082                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2083                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2084                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2085                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2086                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2087                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2088                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2089                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2090                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2091                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2092                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2093                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2094                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2095                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2096                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2097                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2098                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2099                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2100                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2101                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2102                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2103                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2104                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2105                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2106                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2107                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2108                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2109                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2110                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2111                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2112                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2113                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2114                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2115                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2116                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2117                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2118                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2119                 </fields>
2120                 <links>
2121                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2122                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2123                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2124                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2125                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2126                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2127                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2128                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2129                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2130                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2131                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2132                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2133                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2134                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2135                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2136                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2137                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2138                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2139                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2140                 </links>
2141         </class>
2142         <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">
2143                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2144                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2145                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2146                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2147                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2148                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2149                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2150                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2151                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2152                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2153                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2154                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2155                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2156                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2157                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2158                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2159                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
2160                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
2161                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2162                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2163                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2164                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2165                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2166                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2167                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2168                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2169                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2172                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2173                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2174                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2175                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2176                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2177                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2178                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2179                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2180                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2181                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2182                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2183                 </fields>
2184                 <links>
2185                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2186                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2187                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2188                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2189                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2190                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2191                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2192                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2193                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2194                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2195                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2196                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2197                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2198                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2199                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2200                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2201                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2202                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2203                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2204                 </links>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2208                         <field name="bucket" reporter:datatype="link"/>
2209                         <field name="id" reporter:datatype="id" />
2210                         <field name="target_call_number" reporter:datatype="link" />
2211                         <field name="create_time" reporter:datatype="timestamp" />
2212                         <field name="pos" reporter:datatype="int" />
2213                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2214                 </fields>
2215                 <links>
2216                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2217                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2218             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2219                 </links>
2220         </class>
2221         <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">
2222                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2223                         <field name="id" reporter:datatype="id" />
2224                         <field name="item" reporter:datatype="link"/>
2225                         <field name="note" reporter:datatype="text" />
2226                 </fields>
2227                 <links>
2228                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2229                 </links>
2230         </class>
2231         <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">
2232                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2233                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2234                         <field name="btype" reporter:datatype="text"/>
2235                         <field name="id" reporter:datatype="id" />
2236                         <field name="name" reporter:datatype="text"/>
2237                         <field name="owner" reporter:datatype="link"/>
2238                         <field name="pub" reporter:datatype="bool"/>
2239                         <field name="create_time" reporter:datatype="timestamp" />
2240                 </fields>
2241                 <links>
2242                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2248                         <field name="id" reporter:datatype="id" />
2249                         <field name="bucket" reporter:datatype="link"/>
2250                         <field name="note" reporter:datatype="text" />
2251                 </fields>
2252                 <links>
2253                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2254                 </links>
2255         </class>
2256         <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">
2257                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2258                         <field name="hold" reporter:datatype="link"/>
2259                         <field name="id" reporter:datatype="id" />
2260                         <field name="target_copy" reporter:datatype="link"/>
2261                 </fields>
2262                 <links>
2263                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2264                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2265                 </links>
2266         </class>
2267         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2268                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2269                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2270                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2271                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2272                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2273                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2274                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2275                 </fields>
2276                 <links>
2277                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2278                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2279                 </links>
2280         </class>
2281         <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">
2282                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2283                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2284                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2285                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2286                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2287                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2288                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2289                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2290                 </fields>
2291                 <links>
2292                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2293                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2294                 </links>
2295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2296             <actions>
2297                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2298                 <retrieve/>
2299                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2300                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2301             </actions>
2302         </permacrud>
2303         </class>
2304         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2305                 <fields>
2306                         <field name="id" oils_persist:virtual="true" />
2307                         <field name="location" oils_persist:virtual="true" />
2308                         <field name="owning_lib" oils_persist:virtual="true" />
2309                         <field name="holdings" oils_persist:virtual="true" />
2310                         <field name="current_holdings" oils_persist:virtual="true" />
2311                         <field name="supplements" oils_persist:virtual="true" />
2312                         <field name="current_supplements" oils_persist:virtual="true" />
2313                         <field name="indexes" oils_persist:virtual="true" />
2314                         <field name="current_indexes" oils_persist:virtual="true" />
2315                         <field name="online" oils_persist:virtual="true" />
2316                         <field name="missing" oils_persist:virtual="true" />
2317                         <field name="incomplete" oils_persist:virtual="true" />
2318                 </fields>
2319         </class>
2320         <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">
2321                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2322                         <field name="active" reporter:datatype="bool"/>
2323                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2324                         <field name="create_date" reporter:datatype="timestamp"/>
2325                         <field name="creator" />
2326                         <field name="deleted" reporter:datatype="bool"/>
2327                         <field name="edit_date" reporter:datatype="timestamp"/>
2328                         <field name="editor" />
2329                         <field name="id" reporter:datatype="id" />
2330                         <field name="last_xact_id" />
2331                         <field name="marc" />
2332                         <field name="source" />
2333                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2334                 </fields>
2335                 <links>
2336                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2337                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2338                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2339                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2340                 </links>
2341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2342                         <actions>
2343                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2344                                 <retrieve/>
2345                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2346                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2347                         </actions>
2348                 </permacrud>
2349         </class>
2350         <class id="sfr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::full_rec" oils_persist:tablename="serial.full_rec" reporter:label="Serial Full Record">
2351                 <fields oils_persist:primary="id" oils_persist:sequence="serial.full_rec_id_seq">
2352                         <field name="id" reporter:datatype="id" />
2353                         <field name="ind1" />
2354                         <field name="ind2" />
2355                         <field name="record" />
2356                         <field name="subfield" />
2357                         <field name="tag" />
2358                         <field name="value" />
2359                 </fields>
2360                 <links>
2361                         <link field="record" reltype="has_a" key="id" map="" class="sre"/>
2362                 </links>
2363         </class>
2364         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2365                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2366                         <field name="active" reporter:datatype="bool"/>
2367                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2368                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2369                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2370                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2371                 </fields>
2372                 <links>
2373                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2374                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2375                 </links>
2376         </class>
2377         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2378                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2379                         <field name="active" reporter:datatype="bool"/>
2380                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2381                         <field reporter:label="Label" name="label" />
2382                 </fields>
2383                 <links>
2384                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2385                 </links>
2386         </class>
2387         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2389                         <field name="id" reporter:datatype="id" />
2390                         <field name="subscription" reporter:datatype="link"/>
2391                         <field name="target_copy" reporter:datatype="link"/>
2392                         <field name="location" reporter:datatype="link"/>
2393                         <field name="binding_unit" reporter:datatype="link"/>
2394                         <field name="label" />
2395                 </fields>
2396                 <links>
2397                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2398                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2399                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2400                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2401                 </links>
2402         </class>
2403         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2404                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2405                         <field name="id" reporter:datatype="id" />
2406                         <field name="subscription" reporter:datatype="link"/>
2407                         <field name="generated_coverage" reporter:datatype="text"/>
2408                         <field name="textual_holdings" reporter:datatype="text"/>
2409                 </fields>
2410                 <links>
2411                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2412                 </links>
2413         </class>
2414         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2416                         <field name="id" reporter:datatype="id" />
2417                         <field name="subscription" reporter:datatype="link"/>
2418                         <field name="generated_coverage" reporter:datatype="text"/>
2419                         <field name="textual_holdings" reporter:datatype="text"/>
2420                 </fields>
2421                 <links>
2422                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2423                 </links>
2424         </class>
2425         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2426                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2427                         <field name="id" reporter:datatype="id" />
2428                         <field name="subscription" reporter:datatype="link"/>
2429                         <field name="generated_coverage" reporter:datatype="text"/>
2430                         <field name="textual_holdings" reporter:datatype="text"/>
2431                 </fields>
2432                 <links>
2433                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2434                 </links>
2435         </class>
2436
2437         <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">
2438                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2439                         <field name="id" reporter:datatype="id" />
2440                         <field name="owning_copy" reporter:datatype="link"/>
2441                         <field name="stat_cat" reporter:datatype="link"/>
2442                         <field name="stat_cat_entry" reporter:datatype="link"/>
2443                 </fields>
2444                 <links>
2445                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2446                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2447                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2448                 </links>
2449         </class>
2450         <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">
2451                 <fields oils_persist:primary="code">
2452                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2453                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2454                 </fields>
2455                 <links/>
2456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2457             <actions>
2458                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2459                 <retrieve/>
2460                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2461                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2462             </actions>
2463         </permacrud>
2464         </class>
2465         <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">
2466                 <fields oils_persist:primary="code">
2467                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2468                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2469                 </fields>
2470                 <links/>
2471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2472             <actions>
2473                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2474                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2475                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2476                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2477             </actions>
2478         </permacrud>
2479         </class>
2480         <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">
2481                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2482                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2483                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2484                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2485                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2486                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2487                 </fields>
2488                 <links>
2489             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2490         </links>
2491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2492             <actions>
2493                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2494                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2495                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2496                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2497             </actions>
2498         </permacrud>
2499         </class>
2500         <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">
2501                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2502                         <field name="id" reporter:datatype="id" />
2503                         <field name="name" reporter:datatype="text"/>
2504                 </fields>
2505                 <links/>
2506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2507             <actions>
2508                 <create permission="CREATE_LASSO" global_required="true"/>
2509                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2510                 <update permission="UPDATE_LASSO" global_required="true"/>
2511                 <delete permission="DELETE_LASSO" global_required="true"/>
2512             </actions>
2513         </permacrud>
2514         </class>
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2517                         <field name="id" reporter:datatype="id" />
2518                         <field name="lasso" reporter:datatype="link"/>
2519                         <field name="org_unit" reporter:datatype="org_unit"/>
2520                 </fields>
2521                 <links>
2522                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
2523                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
2528                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
2529                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
2530                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2536                         <field name="id" reporter:datatype="id" />
2537                         <field name="from_org" reporter:datatype="org_unit"/>
2538                         <field name="to_org" reporter:datatype="org_unit"/>
2539                         <field name="prox" reporter:datatype="int" />
2540                 </fields>
2541                 <links>
2542                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
2543                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
2544                 </links>
2545         </class>
2546         <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">
2547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2548                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2549                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
2550                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
2551                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
2552                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
2553                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
2554                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
2555                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
2556                 </fields>
2557                 <links/>
2558         </class>
2559         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
2560                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
2561                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
2562                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2563                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2564                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
2565                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
2566                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2567                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
2568                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2569                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
2570                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
2571                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
2572                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
2573                 </fields>
2574                 <links>
2575                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2576                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
2577                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
2578                 </links>
2579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2580             <actions>
2581                 <create permission="ADMIN_SURVEY" context_field="owner"/>
2582                 <retrieve/>
2583                 <update permission="ADMIN_SURVEY" context_field="owner"/>
2584                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
2585             </actions>
2586         </permacrud>
2587         </class>
2588         <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">
2589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
2590                         <field name="address_type"  reporter:datatype="text"/>
2591                         <field name="city"  reporter:datatype="text"/>
2592                         <field name="country"  reporter:datatype="text"/>
2593                         <field name="county"  reporter:datatype="text"/>
2594                         <field name="id" reporter:datatype="id" />
2595                         <field name="org_unit" reporter:datatype="org_unit"/>
2596                         <field name="post_code"  reporter:datatype="text"/>
2597                         <field name="state"  reporter:datatype="text"/>
2598                         <field name="street1"  reporter:datatype="text"/>
2599                         <field name="street2"  reporter:datatype="text"/>
2600                         <field name="valid" reporter:datatype="bool"/>
2601                 </fields>
2602                 <links>
2603                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2604                 </links>
2605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2606             <actions>
2607                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
2608                 <retrieve/>
2609                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
2610                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
2611             </actions>
2612         </permacrud>
2613         </class>
2614         <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">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
2616                         <field name="status" oils_persist:virtual="true" />
2617                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
2618                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
2619                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
2620                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
2621                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
2622                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
2623                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
2624                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
2625                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
2626                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
2627                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
2628                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
2629                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
2630                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
2631                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
2632                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
2633                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
2634                         <field reporter:label="Item Selection Depth" name="selection_depth" />
2635                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
2636                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
2637                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
2638                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2639                         <field name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
2640                         <field name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
2641                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
2642                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
2643                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
2644                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
2645                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
2646                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
2647                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
2648                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
2649                 </fields>
2650                 <links>
2651                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
2652                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
2653                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
2654                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
2655                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
2657                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2658                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2659                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
2660                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
2661                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
2662                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
2663                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
2664                         <link field="notes" reltype="might_have" key="hold" map="" class="ahrn"/>
2665                 </links>
2666         </class>
2667         <class id="ahrn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
2669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2670                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
2671                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2672                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
2673                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
2674                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
2675                 </fields>
2676                 <links>
2677                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2678                 </links>
2679         </class>
2680         <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">
2681                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
2682                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2683                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
2684                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
2685                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
2686                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
2687                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2688                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2689                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
2690                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
2691                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
2692                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
2693                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
2694                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2695                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2701                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
2702                 </fields>
2703                 <links>
2704                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
2705                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
2706                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
2707                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
2708                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
2709                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
2710                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
2711                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
2712                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
2713                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
2714                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
2715                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
2716                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
2717                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
2718                         <link field="distribution_formulas" reltype="has_many" key="owner" map="" class="acqdf"/>
2719                         <link field="distribution_formula_entries" reltype="has_many" key="owning_lib" map="" class="acqdfe"/>
2720                 </links>
2721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2722             <actions>
2723                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
2724                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
2725                     <context field="id"/>
2726                     <context field="parent_ou"/>
2727                                 </retrieve>
2728                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
2729                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
2730             </actions>
2731         </permacrud>
2732         </class>
2733         <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">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
2735                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2736                         <field name="btype" reporter:datatype="text"/>
2737                         <field name="id" reporter:datatype="id" />
2738                         <field name="name"  reporter:datatype="text"/>
2739                         <field name="owner" reporter:datatype="link"/>
2740                         <field name="pub" reporter:datatype="bool"/>
2741                         <field name="create_time" reporter:datatype="timestamp" />
2742                 </fields>
2743                 <links>
2744                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2745                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
2746                 </links>
2747         </class>
2748         <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">
2749                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
2750                         <field name="id" reporter:datatype="id" />
2751                         <field name="bucket" reporter:datatype="link"/>
2752                         <field name="note" reporter:datatype="text" />
2753                 </fields>
2754                 <links>
2755                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2756                 </links>
2757         </class>
2758         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
2759                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
2760                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
2761                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2762                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2763                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2764                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2765                 </fields>
2766                 <links>
2767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2768                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
2769                 </links>
2770         </class>
2771         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
2772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
2773                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
2774                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2775                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
2776                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2777                 </fields>
2778                 <links>
2779                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2780                 </links>
2781         </class>
2782         <class id="actsc" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
2783                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
2784                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
2785                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2786                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2787                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
2788                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2789                 </fields>
2790                 <links>
2791                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2792                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
2793                 </links>
2794         </class>
2795         <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">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
2797                         <field name="field" reporter:datatype="link"/>
2798                         <field name="id" reporter:datatype="id" />
2799                         <field name="source" reporter:datatype="link"/>
2800                         <field name="value"  reporter:datatype="text"/>
2801                 </fields>
2802                 <links>
2803                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2804                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2805                 </links>
2806         </class>
2807         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
2809                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2810                         <field name="btype" reporter:datatype="text"/>
2811                         <field name="id" reporter:datatype="id" />
2812                         <field name="name"  reporter:datatype="text"/>
2813                         <field name="owner" reporter:datatype="link"/>
2814                         <field name="pub" reporter:datatype="bool"/>
2815                         <field name="create_time" reporter:datatype="timestamp" />
2816                 </fields>
2817                 <links>
2818                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2819                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
2820                 </links>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="bucket" reporter:datatype="link"/>
2826                         <field name="note" reporter:datatype="text" />
2827                 </fields>
2828                 <links>
2829                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
2830                 </links>
2831         </class>
2832         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
2833                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2834                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
2835                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
2836                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
2837                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
2838                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
2839                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
2840                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
2841                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2842                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2843                 </fields>
2844                 <links>
2845                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2846                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2847                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2848                 </links>
2849         </class>
2850         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
2851                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
2852                         <field name="id" reporter:datatype="id" />
2853                         <field name="ind1" />
2854                         <field name="ind2" />
2855                         <field name="record" />
2856                         <field name="subfield" />
2857                         <field name="tag" />
2858                         <field name="value" />
2859                 </fields>
2860                 <links>
2861                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2862                 </links>
2863         </class>
2864         <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">
2865                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
2866                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
2867                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2868                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
2869                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2870                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2871                 </fields>
2872                 <links>
2873                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2874                 </links>
2875         </class>
2876         <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">
2877                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
2878                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
2879                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
2880                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
2881                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
2882                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2883                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2884                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
2885                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
2886                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
2887                 </fields>
2888                 <links>
2889                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
2890                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
2891                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
2892                 </links>
2893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2894             <actions>
2895                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
2896                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
2897                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
2898                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
2899             </actions>
2900         </permacrud>
2901         </class>
2902         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
2903                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
2904                         <field name="create_date" reporter:datatype="timestamp"/>
2905                         <field name="creator" reporter:datatype="link"/>
2906                         <field name="edit_date" reporter:datatype="timestamp"/>
2907                         <field name="editor" reporter:datatype="link"/>
2908                         <field name="id" reporter:datatype="id" />
2909                         <field name="pub" reporter:datatype="bool"/>
2910                         <field name="record" reporter:datatype="link"/>
2911                         <field name="value"  reporter:datatype="text"/>
2912                 </fields>
2913                 <links>
2914                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2915                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2916                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2917                 </links>
2918         </class>
2919         <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">
2920                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2921                         <field name="balance_owed" reporter:datatype="money" />
2922                         <field name="total_owed" reporter:datatype="money" />
2923                         <field name="total_paid" reporter:datatype="money" />
2924                         <field name="usr" reporter:datatype="link"/>
2925                 </fields>
2926                 <links>
2927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2928                 </links>
2929         </class>
2930         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
2931                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2932                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2933                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2934                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
2935                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2936                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
2937                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
2938                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2939                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2940                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2941                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2942                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2943                 </fields>
2944                 <links>
2945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2946                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2947                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2948                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2949                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2950                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2951                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2952                 </links>
2953         </class>
2954         <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">
2955                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
2956                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
2957                         <field name="quality" reporter:datatype="int" />
2958                         <field name="source" reporter:datatype="text"/>
2959                         <field name="transcendant" reporter:datatype="bool"/>
2960                 </fields>
2961                 <links/>
2962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2963             <actions>
2964                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
2965                 <retrieve/>
2966                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
2967                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
2968             </actions>
2969         </permacrud>
2970         </class>
2971         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
2972                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2973                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2974                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2975                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2976                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2977                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2978                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2983                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2984                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2985                 </fields>
2986                 <links>
2987                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2988                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2990                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2991                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2992                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2993                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2994                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2995                 </links>
2996         </class>
2997         <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">
2998                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
2999                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3000                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3001                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3002                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3003                 </fields>
3004                 <links>
3005                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3006                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3007                 </links>
3008         </class>
3009         <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">
3010                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3011                         <field name="bucket" reporter:datatype="link"/>
3012                         <field name="id" reporter:datatype="id" />
3013                         <field name="target_user" reporter:datatype="link"/>
3014                         <field name="create_time" reporter:datatype="timestamp" />
3015                         <field name="pos" reporter:datatype="int" />
3016                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3017                 </fields>
3018                 <links>
3019                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3020                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3021             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3022                 </links>
3023         </class>
3024         <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">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3026                         <field name="id" reporter:datatype="id" />
3027                         <field name="item" reporter:datatype="link"/>
3028                         <field name="note" reporter:datatype="text" />
3029                 </fields>
3030                 <links>
3031                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3032                 </links>
3033         </class>
3034         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3035                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3036                         <field name="balance_owed" reporter:datatype="money" />
3037                         <field name="total_owed" reporter:datatype="money" />
3038                         <field name="total_paid" reporter:datatype="money" />
3039                         <field name="usr" reporter:datatype="link"/>
3040                 </fields>
3041                 <links>
3042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3043                 </links>
3044         </class>
3045         <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">
3046                 <fields oils_persist:primary="code" oils_persist:sequence="">
3047                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3048                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3049                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3050                 </fields>
3051                 <links/>
3052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3053             <actions>
3054                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3055                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3056                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3057                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3058             </actions>
3059         </permacrud>
3060         </class>
3061         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3062                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3063                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3064                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3065                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3066                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3067                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3068                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3070                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3072                 </fields>
3073                 <links>
3074                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3075                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3076                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3077                 </links>
3078         </class>
3079         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3081                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3082                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3083                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3084                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3085                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3086                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3087                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3088                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3089                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3090                 </fields>
3091                 <links>
3092                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3093                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3094                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3095                 </links>
3096         </class>
3097         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="">
3099                         <field name="checkin_lib" reporter:datatype="link"/>
3100                         <field name="checkin_staff" reporter:datatype="link"/>
3101                         <field name="checkin_time" reporter:datatype="timestamp"/>
3102                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3103                         <field name="circ_staff" reporter:datatype="link"/>
3104                         <field name="desk_renewal" reporter:datatype="bool"/>
3105                         <field name="due_date" reporter:datatype="timestamp"/>
3106                         <field name="duration" reporter:datatype="interval"/>
3107                         <field name="duration_rule" reporter:datatype="link"/>
3108                         <field name="fine_interval" reporter:datatype="interval"/>
3109                         <field name="id" reporter:datatype="id" />
3110                         <field name="max_fine" reporter:datatype="money" />
3111                         <field name="max_fine_rule" reporter:datatype="link"/>
3112                         <field name="opac_renewal" reporter:datatype="bool"/>
3113                         <field name="phone_renewal" reporter:datatype="bool"/>
3114                         <field name="recuring_fine" reporter:datatype="money" />
3115                         <field name="recuring_fine_rule" reporter:datatype="link"/>
3116                         <field name="renewal_remaining" reporter:datatype="int" />
3117                         <field name="stop_fines" reporter:datatype="text"/>
3118                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3119                         <field name="target_copy" reporter:datatype="link"/>
3120                         <field name="usr" reporter:datatype="link"/>
3121                         <field name="xact_finish" reporter:datatype="timestamp" />
3122                         <field name="xact_start" reporter:datatype="timestamp" />
3123                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3124                 </fields>
3125                 <links>
3126                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3127                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3128                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3129                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3130                 </links>
3131         </class>
3132         <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">
3133                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3134                         <field name="field" reporter:datatype="link"/>
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="source" reporter:datatype="link"/>
3137                         <field name="value" reporter:datatype="text"/>
3138                 </fields>
3139                 <links>
3140                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3141                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3142                 </links>
3143         </class>
3144         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recuring_fine" oils_persist:tablename="config.rule_recuring_fine" reporter:label="Recurring Fine Rule">
3145                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recuring_fine_id_seq">
3146                         <field name="high" reporter:datatype="money" />
3147                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3148                         <field name="low" reporter:datatype="money" />
3149                         <field name="name" reporter:datatype="text"/>
3150                         <field name="normal" reporter:datatype="money" />
3151                         <field name="recurance_interval" reporter:datatype="interval"/>
3152                 </fields>
3153                 <links/>
3154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3155             <actions>
3156                 <create permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3157                 <retrieve/>
3158                 <update permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3159                 <delete permission="ADMIN_RECURING_FINE_RULE" global_required="true"/>
3160             </actions>
3161         </permacrud>
3162         </class>
3163         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3164                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3165                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3166                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3167                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3168                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3169                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3170                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3171                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3172                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3173                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3174                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3175                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3179                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3180                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3181                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3182                 </links>
3183         </class>
3184         <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">
3185                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3186                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3187                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3188                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3189                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3190                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3191                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3192                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3193                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3194                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3195                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3196                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3197                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3198                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3199                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3200                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3201                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3202                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3203                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3204                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3205                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3206                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3207                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3208                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3209                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3210                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3211                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3212                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3213                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3214                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3222                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3223                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3224                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3226                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3227                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3228                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3229                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3230                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3231                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3232                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3233                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3234                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3235                 </links>
3236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3237             <actions>
3238                 <create permission="CREATE_COPY">
3239                     <context link="call_number" field="owning_lib"/>
3240                 </create>
3241                 <retrieve/>
3242                 <update permission="UPDATE_COPY">
3243                     <context link="call_number" field="owning_lib"/>
3244                 </update>
3245                 <delete permission="DELETE_COPY">
3246                     <context link="call_number" field="owning_lib"/>
3247                 </delete>
3248             </actions>
3249         </permacrud>
3250         </class>
3251         <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">
3252                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3253                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3254                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3255                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3256                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3257                 </fields>
3258                 <links/>
3259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3260             <actions>
3261                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3262                 <retrieve/>
3263                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3264                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3265             </actions>
3266         </permacrud>
3267         </class>
3268         <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">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3270                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3271                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3272                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3273                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3274                 </fields>
3275                 <links/>
3276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3277             <actions>
3278                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3279                 <retrieve/>
3280                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3281                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3282             </actions>
3283         </permacrud>
3284         </class>
3285         <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">
3286                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3287                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3288                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3289                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3290                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3291                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3292                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3293                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3294                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3295                 </fields>
3296                 <links>
3297                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3298                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3299                 </links>
3300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3301             <actions>
3302                 <create permission="CREATE_PERM" global_required="true"/>
3303                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3304                 <update permission="UPDATE_PERM" global_required="true"/>
3305                 <delete permission="DELETE_PERM" global_required="true"/>
3306             </actions>
3307         </permacrud>
3308         </class>
3309         <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">
3310                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3311                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3313                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3314                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3315                 </fields>
3316                 <links>
3317                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3318                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3319                 </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <create permission="ADMIN_SURVEY">
3323                     <context link="question" jump="survey" field="owner"/>
3324                 </create>
3325                 <retrieve/>
3326                 <update permission="ADMIN_SURVEY">
3327                     <context link="question" jump="survey" field="owner"/>
3328                 </update>
3329                 <delete permission="ADMIN_SURVEY">
3330                     <context link="question" jump="survey" field="owner"/>
3331                 </delete>
3332             </actions>
3333         </permacrud>
3334         </class>
3335         <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">
3336                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3337                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3338                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3339                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3340                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3341                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3342                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3343                 </fields>
3344                 <links>
3345                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3346                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3347                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3348                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3349                 </links>
3350         </class>
3351         <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">
3352                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3353                         <field name="balance_owed" reporter:datatype="money" />
3354                         <field name="total_owed" reporter:datatype="money" />
3355                         <field name="total_paid" reporter:datatype="money" />
3356                         <field name="usr" reporter:datatype="link"/>
3357                 </fields>
3358                 <links>
3359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3360                 </links>
3361         </class>
3362         <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">
3363                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3364                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3365                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3366                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3367                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3368                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3369                 </fields>
3370                 <links>
3371                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3372                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3373                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3374                 </links>
3375         </class>
3376         <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">
3377                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3378                         <field name="field" reporter:datatype="link"/>
3379                         <field name="id" reporter:datatype="id" />
3380                         <field name="source" reporter:datatype="link"/>
3381                         <field name="value" reporter:datatype="text"/>
3382                 </fields>
3383                 <links>
3384                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3385                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3386                 </links>
3387         </class>
3388         <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">
3389                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3390                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3391                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3392                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3393                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3394                 </fields>
3395                 <links>
3396                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3397                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3398                 </links>
3399         </class>
3400         <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">
3401                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3402                         <field name="depth" reporter:datatype="int" />
3403                         <field name="grantable" reporter:datatype="bool"/>
3404                         <field name="grp" reporter:datatype="link"/>
3405                         <field name="id" reporter:datatype="id" />
3406                         <field name="perm" reporter:datatype="link"/>
3407                 </fields>
3408                 <links>
3409                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3410                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3411                 </links>
3412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3413             <actions>
3414                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3415                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3416                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3417                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3418             </actions>
3419         </permacrud>
3420         </class>
3421         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3423                         <field name="items" oils_persist:virtual="true" />
3424                         <field name="btype" reporter:datatype="text"/>
3425                         <field name="id" reporter:datatype="id" />
3426                         <field name="name" reporter:datatype="text"/>
3427                         <field name="owner" reporter:datatype="link"/>
3428                         <field name="pub" reporter:datatype="bool"/>
3429                         <field name="create_time" reporter:datatype="timestamp" />
3430                 </fields>
3431                 <links>
3432                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3433                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3434                 </links>
3435         </class>
3436         <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">
3437                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3438                         <field name="id" reporter:datatype="id" />
3439                         <field name="bucket" reporter:datatype="link"/>
3440                         <field name="note" reporter:datatype="text" />
3441                 </fields>
3442                 <links>
3443                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3444                 </links>
3445         </class>
3446         <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">
3447                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3448                         <field name="id" reporter:datatype="int" />
3449                         <field name="usr" reporter:datatype="link"/>
3450                         <field name="work_ou" reporter:datatype="link"/>
3451                 </fields>
3452                 <links>
3453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3454                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3455                 </links>
3456         </class>
3457         <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">
3458                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3459                         <field name="depth" reporter:datatype="int"/>
3460                         <field name="grantable" reporter:datatype="bool"/>
3461                         <field name="id" reporter:datatype="id" />
3462                         <field name="perm" reporter:datatype="link"/>
3463                         <field name="usr" reporter:datatype="link"/>
3464                 </fields>
3465                 <links>
3466                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3467                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3468                 </links>
3469         </class>
3470         <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">
3471                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
3472                         <field name="object_id" reporter:datatype="text"/>
3473                         <field name="grantable" reporter:datatype="bool"/>
3474                         <field name="id" reporter:datatype="id" />
3475                         <field name="perm" reporter:datatype="link"/>
3476                         <field name="usr" reporter:datatype="link"/>
3477                         <field name="object_type" reporter:datatype="text"/>
3478                 </fields>
3479                 <links>
3480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3482                 </links>
3483         </class>
3484         <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">
3485                 <fields oils_persist:primary="id" oils_persist:sequence="">
3486                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3487                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3488                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3489                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3490                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3491                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3492                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3493                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3494                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3495                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3496                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3497                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3498                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3499                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3500                 </fields>
3501                 <links>
3502                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3503                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3504                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3505                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3506                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3507                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3508                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3509                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3510                 </links>
3511         </class>
3512         <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">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="">
3514                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3515                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3516                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3517                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3518                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3519                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3520                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3521                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3525                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3526                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3528                 </fields>
3529                 <links>
3530                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3531                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3532                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3533                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3534                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3535                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3536                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3537                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3538                 </links>
3539         </class>
3540         <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">
3541                 <fields oils_persist:primary="id" oils_persist:sequence="">
3542                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3543                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3544                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3545                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3546                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3547                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3548                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3549                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3550                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3551                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3552                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3553                 </fields>
3554                 <links>
3555                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
3556                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
3557                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
3558                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
3559                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3560                 </links>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="">
3564                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3565                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3566                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3567                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3568                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3569                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3570                         <field reporter:label="Accepting User" name="accepting_usr" />
3571                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
3572                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3573                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3574                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3575                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3576                 </fields>
3577                 <links>
3578                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3579                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3580                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
3581                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3582                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3583                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3584                 </links>
3585         </class>
3586         <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">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
3588                         <field name="bucket" reporter:datatype="link"/>
3589                         <field name="id" reporter:datatype="id" />
3590                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
3591                         <field name="create_time" reporter:datatype="timestamp" />
3592                         <field name="pos" reporter:datatype="int" />
3593                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3594                 </fields>
3595                 <links>
3596                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
3597                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3598             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
3599                 </links>
3600         </class>
3601         <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">
3602                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
3603                         <field name="id" reporter:datatype="id" />
3604                         <field name="item" reporter:datatype="link"/>
3605                         <field name="note" reporter:datatype="text" />
3606                 </fields>
3607                 <links>
3608                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
3609                 </links>
3610         </class>
3611         <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">
3612                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
3613                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
3614                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3615                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3616                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3617                 </fields>
3618                 <links>
3619                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
3620                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3621                 </links>
3622         </class>
3623
3624         <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">
3625                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
3626                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
3627                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
3628                 </fields>
3629                 <links/>
3630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3631             <actions>
3632                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3633                 <retrieve/>
3634                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3635                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
3636             </actions>
3637         </permacrud>
3638         </class>
3639
3640
3641         <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">
3642                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
3643                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
3644                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
3645                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
3646                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
3647                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
3648                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
3649                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
3650                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
3651                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
3652                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
3653                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
3654                 </fields>
3655                 <links>
3656                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
3657                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3658                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
3659                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
3660                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
3661                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3662                 </links>
3663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3664             <actions>
3665                 <create permission="TRANSIT_COPY" context_field="owner">
3666                     <context link="target_copy" field="circ_lib"/>
3667                 </create>
3668                 <retrieve/>
3669                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
3670                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
3671             </actions>
3672         </permacrud>
3673         </class>
3674         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
3676                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3677                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
3678                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
3679                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
3680                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3681                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
3682                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3683                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
3684                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3685                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
3686                 </fields>
3687                 <links>
3688                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3689                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
3690                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
3691                 </links>
3692         </class>
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
3695                         <field name="grp" />
3696                         <field name="id" reporter:datatype="id" />
3697                         <field name="usr" />
3698                 </fields>
3699                 <links>
3700                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3701                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3702                 </links>
3703         </class>
3704         <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">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
3706                         <field name="id" reporter:datatype="id" />
3707                         <field name="fq_field" reporter:datatype="text"/>
3708                         <field name="identity_value" reporter:datatype="text"/>
3709                         <field name="translation" reporter:datatype="text"/>
3710                         <field name="string" reporter:datatype="text"/>
3711                 </fields>
3712                 <links>
3713                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
3714                 </links>
3715         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3716             <actions>
3717                 <create permission="CREATE_TRANSLATION" global_required="true"/>
3718                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
3719                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
3720                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
3721             </actions>
3722         </permacrud>
3723         </class>
3724         <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">
3725                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
3726                         <field name="id" reporter:datatype="id" />
3727                         <field name="fm_class" reporter:datatype="text"/>
3728                         <field name="field" reporter:datatype="text"/>
3729                         <field name="owner" reporter:datatype="org_unit"/>
3730                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
3731                 </fields>
3732                 <links>
3733                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3734                 </links>
3735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3736             <actions>
3737                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3738                 <retrieve/>
3739                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3740                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
3741             </actions>
3742         </permacrud>
3743         </class>
3744         <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">
3745                 <fields oils_persist:primary="code">
3746                         <field name="code" reporter:datatype="id" />
3747                         <field name="marc_code" reporter:datatype="text"/>
3748                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3749                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3750                 </fields>
3751                 <links/>
3752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3753             <actions>
3754                 <create permission="CREATE_LOCALE" global_required="true"/>
3755                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
3756                 <update permission="UPDATE_LOCALE" global_required="true"/>
3757                 <delete permission="DELETE_LOCALE" global_required="true"/>
3758             </actions>
3759         </permacrud>
3760         </class>
3761         <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">
3762                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
3763                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3764                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
3765                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
3766             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
3767                 </fields>
3768                 <links>
3769                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3770                 </links>
3771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3772             <actions>
3773                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
3774                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
3775                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
3776                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
3777             </actions>
3778         </permacrud>
3779         </class>
3780         <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">
3781                 <fields oils_persist:primary="code">
3782                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
3783                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
3784                 </fields>
3785                 <links/>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3789                 <retrieve/>
3790                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3791                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3792             </actions>
3793         </permacrud>
3794         </class>
3795
3796         <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">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
3798                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
3799                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
3800                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
3801                         <field reporter:label="Ratio" name="ratio" />
3802                 </fields>
3803                 <links>
3804                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
3805                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
3806                 </links>
3807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808                         <actions>
3809                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3810                                 <retrieve/>
3811                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3812                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
3813                         </actions>
3814                 </permacrud>
3815         </class>
3816
3817         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
3818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
3819                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
3820                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
3821                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
3822                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
3823                         <field reporter:label="Code" name="code" reporter:datatype="text" />
3824                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
3825                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
3826                 </fields>
3827                 <links>
3828                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
3829                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3830             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
3831                 </links>
3832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3833             <actions>
3834                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
3835                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
3836                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
3837                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
3838             </actions>
3839         </permacrud>
3840         </class>
3841
3842         <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">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
3844                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
3845                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3846                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3847                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3848                         <field name="id" reporter:datatype="id"/>
3849                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
3850                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
3851                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3852                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
3853                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
3854                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
3855                 </fields>
3856                 <links>
3857                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
3858                 </links>
3859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3860             <actions>
3861                 <create permission="ADMIN_PROVIDER">
3862                     <context link="provider" field="owner"/>
3863                 </create>
3864                 <retrieve permission="ADMIN_PROVIDER">
3865                     <context link="provider" field="owner"/>
3866                 </retrieve>
3867                 <update permission="ADMIN_PROVIDER">
3868                     <context link="provider" field="owner"/>
3869                 </update>
3870                 <delete permission="ADMIN_PROVIDER">
3871                     <context link="provider" field="owner"/>
3872                 </delete>
3873             </actions>
3874         </permacrud>
3875         </class>
3876
3877         <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">
3878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
3879                         <field name="id" reporter:datatype="id"/>
3880                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
3881                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3882                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
3883                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
3884                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
3885         </fields>
3886                 <links>
3887                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
3888                 </links>
3889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3890             <actions>
3891                 <create permission="ADMIN_PROVIDER">
3892                     <context link="provider" field="owner"/>
3893                 </create>
3894                 <retrieve permission="ADMIN_PROVIDER">
3895                     <context link="provider" field="owner"/>
3896                 </retrieve>
3897                 <update permission="ADMIN_PROVIDER">
3898                     <context link="provider" field="owner"/>
3899                 </update>
3900                 <delete permission="ADMIN_PROVIDER">
3901                     <context link="provider" field="owner"/>
3902                 </delete>
3903             </actions>
3904         </permacrud>
3905     </class>
3906         <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">
3907                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
3908                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3909                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3910                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3911                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3912                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3913                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3914                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3915                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3916                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3917                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
3918                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3919                 </fields>
3920                 <links>
3921                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
3922                 </links>
3923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3924             <actions>
3925                 <create permission="ADMIN_PROVIDER">
3926                     <context link="contact" jump='provider' field="owner"/>
3927                 </create>
3928                 <retrieve permission="ADMIN_PROVIDER">
3929                     <context link="contact" jump='provider' field="owner"/>
3930                 </retrieve>
3931                 <update permission="ADMIN_PROVIDER">
3932                     <context link="contact" jump='provider' field="owner"/>
3933                 </update>
3934                 <delete permission="ADMIN_PROVIDER">
3935                     <context link="contact" jump='provider' field="owner"/>
3936                 </delete>
3937             </actions>
3938         </permacrud>
3939         </class>
3940
3941         <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">
3942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
3943                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
3944                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
3945                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
3946                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
3947                         <field reporter:label="Code" name="code" reporter:datatype="text" />
3948                         <field name="summary" oils_persist:virtual="true"/>
3949                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
3950                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
3951                 </fields>
3952                 <links>
3953                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
3954                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3955             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
3956             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
3957                 </links>
3958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3959             <actions>
3960                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
3961                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
3962                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
3963                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
3964             </actions>
3965         </permacrud>
3966         </class>
3967
3968         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
3969                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
3970                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
3971                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
3972                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3973                         <field reporter:label="Note" name="note" reporter:datatype="text" />
3974                 </fields>
3975                 <links>
3976                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
3977                 </links>
3978         </class>
3979
3980         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
3981                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
3982                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
3983                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
3984                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
3985                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
3986                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3987                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
3988                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
3989                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
3990                 </fields>
3991                 <links>
3992                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
3993                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
3994                 </links>
3995         </class>
3996
3997         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
3998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
3999                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4000                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4001                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4002                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4003                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4004                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4005                         <field name="summary" oils_persist:virtual="true"/>
4006                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4007                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4008                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4009                 </fields>
4010                 <links>
4011                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4012                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4013             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4014             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4015             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4016                 </links>
4017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018             <actions>
4019                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4020                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4021                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4022                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4023             </actions>
4024         </permacrud>
4025         </class>
4026
4027         <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">
4028                 <fields oils_persist:primary="fund">
4029                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4030                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4031                 </fields>
4032                 <links>
4033                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4034                 </links>
4035         </class>
4036
4037         <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">
4038                 <fields oils_persist:primary="fund">
4039                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4040                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4041                 </fields>
4042                 <links>
4043                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4044                 </links>
4045         </class>
4046
4047         <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">
4048                 <fields oils_persist:primary="fund">
4049                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4050                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4051                 </fields>
4052                 <links>
4053                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4054                 </links>
4055         </class>
4056
4057         <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">
4058                 <fields oils_persist:primary="fund">
4059                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4060                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4061                 </fields>
4062                 <links>
4063                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4064                 </links>
4065         </class>
4066
4067         <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">
4068                 <fields oils_persist:primary="fund">
4069                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4070                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4071                 </fields>
4072                 <links>
4073                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4074                 </links>
4075         </class>
4076
4077         <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">
4078                 <fields oils_persist:primary="funding_source">
4079                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4080                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4081                 </fields>
4082                 <links>
4083                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4084                 </links>
4085         </class>
4086
4087         <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">
4088                 <fields oils_persist:primary="funding_source">
4089                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4090                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4091                 </fields>
4092                 <links>
4093                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4094                 </links>
4095         </class>
4096
4097         <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">
4098                 <fields oils_persist:primary="funding_source">
4099                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4100                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
4101                 </fields>
4102                 <links>
4103                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4104                 </links>
4105         </class>
4106
4107         <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">
4108                 <fields oils_persist:primary="fund">
4109                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4110                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
4111                 </fields>
4112                 <links>
4113                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4114                 </links>
4115         </class>
4116
4117         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
4119                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4120                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4121                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4122                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4123                         <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4124                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4125                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4126                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4127                 </fields>
4128                 <links>
4129                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4130                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4131                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4132                 </links>
4133         </class>
4134
4135         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
4136                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
4137                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
4138                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4139                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
4140                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4141                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4142                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4143                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
4144                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
4145                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4146                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4147                 </fields>
4148                 <links>
4149                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4150                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4151                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4152                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4153                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
4154                 </links>
4155         </class>
4156
4157         <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">
4158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
4159                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
4160                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4161                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4162                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4163                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4164                         <field reporter:label="State" name="state" reporter:datatype="text" />
4165                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
4166                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4167                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4168                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
4169                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
4170                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
4171                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
4172                 </fields>
4173                 <links>
4174                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4175                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4176                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4177                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
4178                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4179                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
4180                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4181                 </links>
4182                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4183                         <actions>
4184                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4185                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
4186                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4187                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4188                         </actions>
4189                 </permacrud>
4190         </class>
4191
4192         <class id="acqpon" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
4194                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4195                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4196                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4197                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4198                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4199                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4200                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4201                 </fields>
4202                 <links>
4203                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4204                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4205                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4206                 </links>
4207         </class>
4208
4209         <class id="jub" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
4210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
4211                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
4212                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
4213                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
4214                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4215                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4216                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4217                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4218                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
4219                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
4220                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
4221                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
4222                         <field reporter:label="State" name="state" reporter:datatype="text" />
4223                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4224                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4225                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
4226                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
4227                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
4228                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
4229                 </fields>
4230                 <links>
4231                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4232                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4233                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4234                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4235                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4236                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4237                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4238                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
4239                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
4240                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
4241                 </links>
4242         </class>
4243
4244         <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">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
4246                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
4247                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
4248                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4249                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4250                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4251                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4252                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4253                 </fields>
4254                 <links>
4255                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4256                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4257                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4258                 </links>
4259         </class>
4260
4261         <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">
4262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
4263                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
4264                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
4265                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
4266                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
4267                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
4268                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
4269                 </fields>
4270                 <links>
4271                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4272                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
4273                 </links>
4274         </class>
4275
4276         <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">
4277                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
4278                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
4279                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
4280                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
4281                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
4282                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
4283                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
4284                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4285                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
4286                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
4287                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
4288                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
4289                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4290                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
4291                 </fields>
4292                 <links>
4293                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4294                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
4295                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4296                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
4297                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4298                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4299                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4300                 </links>
4301         </class>
4302
4303         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
4304                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4305                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4306                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4307                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4308                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4309                 </fields>
4310                 <links/>
4311         </class>
4312
4313         <class id="acqlimad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
4314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4315                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4316                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4317                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4318                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4319                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4320                 </fields>
4321                 <links/>
4322         </class>
4323
4324         <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">
4325                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4326                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4327                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4328                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4329                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4330                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4331                 </fields>
4332                 <links/>
4333         </class>
4334         <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">
4335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4336                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4337                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4338                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4339                         <field reporter:label="User" name="usr" reporter:datatype="link" />
4340                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4341                 </fields>
4342                 <links>
4343                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4344                 </links>
4345         </class>
4346
4347         <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">
4348             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4349                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4350                 <field reporter:label="Code" name="code" reporter:datatype="text" />
4351                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4352                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
4353                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4354                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4355         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
4356
4357             </fields>
4358             <links>
4359                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4360             </links>
4361             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4362                 <actions>
4363                     <create permission="ADMIN_PROVIDER">
4364                         <context link="provider" field="owner"/>
4365                     </create>
4366                     <retrieve permission="ADMIN_PROVIDER">
4367                         <context link="provider" field="owner"/>
4368                     </retrieve>
4369                     <update permission="ADMIN_PROVIDER">
4370                         <context link="provider" field="owner"/>
4371                     </update>
4372                     <delete permission="ADMIN_PROVIDER">
4373                         <context link="provider" field="owner"/>
4374                     </delete>
4375                 </actions>
4376             </permacrud>
4377         </class>
4378         
4379         <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">
4380             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
4381                 <field reporter:label="ID" name="id" reporter:datatype="id" />
4382                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4383                 <field reporter:label="Name" name="name" reporter:datatype="text" />
4384                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
4385             </fields>
4386             <links>
4387                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4388             </links>
4389             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4390                 <actions>
4391                     <create permission="ADMIN_PROVIDER">
4392                         <context link="provider" field="owner"/>
4393                     </create>
4394                     <retrieve permission="ADMIN_PROVIDER">
4395                         <context link="provider" field="owner"/>
4396                     </retrieve>
4397                     <update permission="ADMIN_PROVIDER">
4398                         <context link="provider" field="owner"/>
4399                     </update>
4400                     <delete permission="ADMIN_PROVIDER">
4401                         <context link="provider" field="owner"/>
4402                     </delete>
4403                 </actions>
4404             </permacrud>
4405         </class>
4406         
4407         <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">
4408             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
4409                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
4410                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4411                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
4412                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
4413                 </fields>
4414                 <links/>
4415         </class>
4416
4417         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
4418                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
4419                         <field name="id" reporter:datatype="id" />
4420                         <field name="parent" reporter:datatype="link"/>
4421                         <field name="owner" reporter:datatype="link"/>
4422                         <field name="create_time" reporter:datatype="timestamp"/>
4423                         <field name="name" reporter:datatype="text"/>
4424                         <field name="shared" reporter:datatype="bool"/>
4425                         <field name="share_with" reporter:datatype="link"/>
4426                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4427                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
4428                 </fields>
4429                 <links>
4430                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4431                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
4432                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
4433                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4434                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
4435                 </links>
4436         </class>
4437         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
4438                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
4439                         <field name="id" reporter:datatype="id" />
4440                         <field name="parent" reporter:datatype="link"/>
4441                         <field name="owner" reporter:datatype="link"/>
4442                         <field name="create_time" reporter:datatype="timestamp"/>
4443                         <field name="name" reporter:datatype="text"/>
4444                         <field name="shared" reporter:datatype="bool"/>
4445                         <field name="share_with" reporter:datatype="link"/>
4446                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4447                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
4448                 </fields>
4449                 <links>
4450                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4451                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
4452                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
4453                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4454                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
4455                 </links>
4456         </class>
4457         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
4458                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
4459                         <field name="id" reporter:datatype="id" />
4460                         <field name="parent" reporter:datatype="link"/>
4461                         <field name="owner" reporter:datatype="link"/>
4462                         <field name="create_time" reporter:datatype="timestamp"/>
4463                         <field name="name" reporter:datatype="text"/>
4464                         <field name="shared" reporter:datatype="bool"/>
4465                         <field name="share_with" reporter:datatype="link"/>
4466                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4467                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4468                 </fields>
4469                 <links>
4470                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4471                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
4472                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
4473                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
4474                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
4475                 </links>
4476         </class>
4477         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
4478                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
4479                         <field name="id" reporter:datatype="id" />
4480                         <field name="owner" reporter:datatype="link"/>
4481                         <field name="create_time" reporter:datatype="timestamp"/>
4482                         <field name="name" reporter:datatype="text"/>
4483                         <field name="data" reporter:datatype="text"/>
4484                         <field name="folder" reporter:datatype="link"/>
4485                         <field name="description" reporter:datatype="text"/>
4486                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
4487                 </fields>
4488                 <links>
4489                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4490                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
4491                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
4492                 </links>
4493         </class>
4494         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
4495                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
4496                         <field name="id" reporter:datatype="id" />
4497                         <field name="owner" reporter:datatype="link"/>
4498                         <field name="create_time" reporter:datatype="timestamp"/>
4499                         <field name="template" reporter:datatype="link"/>
4500                         <field name="data" reporter:datatype="link"/>
4501                         <field name="folder" reporter:datatype="link"/>
4502                         <field name="recur" reporter:datatype="bool"/>
4503                         <field name="recurance" reporter:datatype="interval"/>
4504                         <field name="name" reporter:datatype="text"/>
4505                         <field name="description" reporter:datatype="text"/>
4506                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
4507                 </fields>
4508                 <links>
4509                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4510                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
4511                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
4512                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
4513                 </links>
4514         </class>
4515         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
4516                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
4517                         <field name="id" reporter:datatype="id" />
4518                         <field name="runner" reporter:datatype="link"/>
4519                         <field name="start_time" reporter:datatype="timestamp"/>
4520                         <field name="complete_time" reporter:datatype="timestamp"/>
4521                         <field name="run_time" reporter:datatype="timestamp"/>
4522                         <field name="email" reporter:datatype="text"/>
4523                         <field name="excel_format" reporter:datatype="bool"/>
4524                         <field name="csv_format" reporter:datatype="bool"/>
4525                         <field name="html_format" reporter:datatype="bool"/>
4526                         <field name="error_code" reporter:datatype="int"/>
4527                         <field name="error_text" reporter:datatype="text"/>
4528                         <field name="report" reporter:datatype="link"/>
4529                         <field name="folder" reporter:datatype="link"/>
4530                         <field name="chart_pie" reporter:datatype="bool"/>
4531                         <field name="chart_bar" reporter:datatype="bool"/>
4532                         <field name="chart_line" reporter:datatype="bool"/>
4533                 </fields>
4534                 <links>
4535                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
4536                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
4537                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
4538                 </links>
4539         </class>
4540         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
4541                 <fields oils_persist:primary="id">
4542                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4543                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
4544                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4545                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4546                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4547                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4548                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4549                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4550                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4551                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4552                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4553                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4554                 </fields>
4555                 <links>
4556                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4557                 </links>
4558         </class>
4559         <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">
4560                 <fields oils_persist:primary="id">
4561                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4562                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
4563                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4564                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4565                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4566                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4567                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4568                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4569                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4570                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4571                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4572                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4573                 </fields>
4574                 <links>
4575                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4576                 </links>
4577         </class>
4578         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
4579                 <fields oils_persist:primary="id">
4580                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
4581                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
4582                         <field reporter:label="Fingerprint" name="fingerprint" />
4583                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
4584                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
4585                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
4586                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
4587                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
4588                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
4589                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
4590                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
4591                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
4592                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
4593                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
4594                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
4595                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
4596                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
4597                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
4598                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
4599                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
4600                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
4601                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
4602                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
4603                 </fields>
4604                 <links>
4605                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4606                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
4607                 </links>
4608         </class>
4609         <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">
4610                 <fields oils_persist:primary="id">
4611                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
4612                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
4613                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
4614                 </fields>
4615                 <links>
4616                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
4617                 </links>
4618         </class>
4619         <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">
4620                 <fields oils_persist:primary="id">
4621                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
4622                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
4623                 </fields>
4624                 <links>
4625                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
4626                 </links>
4627         </class>
4628         <class id="rhrr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
4629                 <fields oils_persist:primary="id">
4630                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4631                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
4632                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
4633                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
4634                 </fields>
4635                 <links>
4636                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
4637                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
4638                 </links>
4639         </class>
4640         <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">
4641                 <fields oils_persist:primary="xact">
4642                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
4643                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
4644                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
4645                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
4646                 </fields>
4647                 <links>
4648                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4649                 </links>
4650         </class>
4651         <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">
4652                 <fields oils_persist:primary="xact">
4653                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
4654                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
4655                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
4656                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
4657                 </fields>
4658                 <links>
4659                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
4660                 </links>
4661         </class>
4662         <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)">
4663                 <fields oils_persist:primary="id">
4664                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
4665                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
4666                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
4667                 </fields>
4668                 <links>
4669                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
4670                 </links>
4671         </class>
4672         <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">
4673                 <fields oils_persist:primary="id">
4674                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
4675                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
4676                 </fields>
4677                 <links>
4678                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
4679                 </links>
4680         </class>
4681         <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">
4682                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
4683                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
4684                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
4685                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
4686                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
4687                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4688                 </fields>
4689                 <links>
4690                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4691                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
4692                 </links>
4693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4694                         <actions>
4695                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4696                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4697                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4698                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
4699                         </actions>
4700                 </permacrud>
4701         </class>
4702         <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">
4703                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
4704                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
4705                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
4706                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
4707                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
4708                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4709                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
4710                 </fields>
4711                 <links>
4712                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
4713                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4714                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4715                 </links>
4716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4717                         <actions>
4718                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
4719                                         <context link="formula" field="owner"/>
4720                                 </create>
4721                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
4722                                         <context link="formula" field="owner"/>
4723                                 </retrieve>
4724                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
4725                                         <context link="formula" field="owner"/>
4726                                 </update>
4727                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
4728                                         <context link="formula" field="owner"/>
4729                                 </delete>
4730                         </actions>
4731                 </permacrud>
4732         </class>
4733
4734     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
4735         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
4736             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4737             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4738             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4739             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
4740             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4741             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
4742             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
4743             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
4744             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
4745             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
4746             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
4747             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
4748             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
4749             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
4750             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4751         </fields>
4752     </class>
4753
4754     <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">
4755         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
4756             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4757             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4758             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4759             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4760             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4761         </fields>
4762     </class>
4763
4764     <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">
4765         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
4766             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4767             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4768             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4769             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
4770             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
4771             <field reporter:label="City" name="city" reporter:datatype="text"/>
4772             <field reporter:label="State" name="state" reporter:datatype="text"/>
4773             <field reporter:label="Country" name="country" reporter:datatype="text"/>
4774             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4775             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4776         </fields>
4777     </class>
4778
4779     <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">
4780         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
4781             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4782             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4783             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4784             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
4785             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
4786             <field reporter:label="City" name="city" reporter:datatype="text"/>
4787             <field reporter:label="State" name="state" reporter:datatype="text"/>
4788             <field reporter:label="Country" name="country" reporter:datatype="text"/>
4789             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4790             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4791         </fields>
4792     </class>
4793
4794     <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">
4795         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
4796             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
4797             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
4798             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
4799             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
4800             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
4801             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
4802         </fields>
4803     </class>
4804
4805
4806         <!-- ********************************************************************************************************************* -->
4807         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
4808         <!-- ********************************************************************************************************************* -->
4809         <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">
4810                 <fields oils_persist:primary="id">
4811                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
4812                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
4813                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
4814                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4815                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4816                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
4817                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
4818                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
4819                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
4820                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
4821                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
4822                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
4823                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
4824                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
4825                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
4826                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
4827                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
4828                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
4829                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
4830                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
4831                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
4832                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
4833                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
4834                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
4835                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
4836                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
4837                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
4838                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
4839                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
4840                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
4841                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
4842                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
4843                 </fields>
4844                 <links>
4845                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
4846                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
4847                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
4848                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
4849                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4850                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
4851                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
4852                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
4853                 </links>
4854         </class>
4855
4856         <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">
4857                 <fields oils_persist:primary="id">
4858                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
4859                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4860                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4861                 </fields>
4862                 <links>
4863                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4864                 </links>
4865         </class>
4866
4867         <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">
4868                 <fields oils_persist:primary="id">
4869                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
4870                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4871                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
4872                 </fields>
4873                 <links>
4874                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4875                 </links>
4876         </class>
4877
4878         <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">
4879                 <fields oils_persist:primary="id">
4880                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4881
4882                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
4883                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
4884                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
4885
4886                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
4887                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
4888                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
4889
4890                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
4891                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
4892
4893                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4895                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
4896
4897                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
4898                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
4899
4900                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
4901                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
4902                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
4903
4904                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
4905                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
4906                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
4907
4908                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
4909                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
4910                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
4911                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
4912
4913                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
4914                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
4915
4916                 </fields>
4917                 <links>
4918                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
4919                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4920                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4921                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4922                 </links>
4923         </class>
4924
4925         <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">
4926                 <oils_persist:source_definition>
4927
4928                         SELECT  t.*
4929                           FROM  action.transit_copy t
4930                                 JOIN actor.org_unit AS s ON (t.source = s.id)
4931                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
4932                           WHERE s.parent_ou &lt;&gt; d.parent_ou
4933
4934                 </oils_persist:source_definition>
4935                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4936                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
4937                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
4938                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4939                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
4940                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
4941                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
4942                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
4943                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4944                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4945                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4946                 </fields>
4947                 <links>
4948                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
4949                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4951                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4952                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4953                 </links>
4954         </class>
4955
4956         <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">
4957                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4958                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4959                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4960                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4961                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4962                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4963                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4964                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4965                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4966                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4967                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4968                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4969                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4970                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4971                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4972                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4973                         <field reporter:label="Recurring Fine Amount" name="recuring_fine" reporter:datatype="money" />
4974                         <field reporter:label="Recurring Fine Rule" name="recuring_fine_rule" reporter:datatype="link"/>
4975                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4976                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4977                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4978                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4979                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4980                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4981                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
4982                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4983                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4984                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4985                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4986                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4987                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4988                 </fields>
4989                 <links>
4990                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4991                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4992                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4993                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4994                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4995                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4996                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4997                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4998                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4999                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5000                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5001                         <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5002                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
5003                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5004                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5005                 </links>
5006         </class>
5007
5008     <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">
5009         <fields oils_persist:primary="id">
5010             <field reporter:label="Title" name="title" reporter:datatype="text"/>
5011             <field reporter:label="Author" name="author" reporter:datatype="text"/>
5012             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
5013             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5014             <field reporter:label="Price" name="price" reporter:datatype="money"/>
5015             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5016             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
5017             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
5018             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
5019             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
5020             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
5021             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
5022             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
5023             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
5024             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
5025             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
5026             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5027             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5028             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
5029             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
5030             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5031             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5032             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5033             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
5034             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5035             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
5036             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
5037             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
5038             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
5039             <field reporter:label="Status" name="status" reporter:datatype="link"/>
5040             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
5041             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
5042             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
5043             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
5044         </fields>
5045         <links>
5046             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5047             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5048             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5049             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5050             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5051         </links>
5052     </class>
5053
5054     <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">
5055         <fields oils_persist:primary="id">
5056             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5057             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5058             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5059             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5060         </fields>
5061         <links>
5062             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5063             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5064         </links>
5065     </class>
5066
5067     <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">
5068         <fields oils_persist:primary="owning_lib">
5069             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5070             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5071             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5072         </fields>
5073         <links>
5074             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5075         </links>
5076     </class>
5077
5078     <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">
5079         <fields oils_persist:primary="id">
5080             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5081             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5082             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5083             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5084             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5085         </fields>
5086         <links>
5087             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5088             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5089             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5090         </links>
5091     </class>
5092
5093     <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">
5094         <fields oils_persist:primary="circ_lib">
5095             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
5096             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5097             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5098             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5099         </fields>
5100         <links>
5101             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5102             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5103         </links>
5104     </class>
5105
5106     <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">
5107         <fields oils_persist:primary="id">
5108             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
5109             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
5110             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5111             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
5112             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
5113         </fields>
5114         <links>
5115             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
5116             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5117             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
5118         </links>
5119     </class>
5120
5121     <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">
5122         <fields oils_persist:primary="home_ou">
5123             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
5124             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5125             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
5126             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
5127         </fields>
5128         <links>
5129             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5130             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
5131         </links>
5132     </class>
5133         <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">
5134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
5135                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
5136                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
5137                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
5138                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5139                 </fields>
5140                 <links>
5141                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5142                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
5143                 </links>
5144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5145                         <actions>
5146                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5147                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
5148                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5149                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
5150                         </actions>
5151                 </permacrud>
5152         </class>
5153         <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">
5154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
5155                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
5156                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
5157                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
5158                 </fields>
5159                 <links>
5160                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5161                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
5162                         </links>
5163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5164                 <actions>
5165                                 <create permission="ADMIN_ACQ_FUND_TAG">
5166                                         <context link="tag" field="owner"/>
5167                                 </create>
5168                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
5169                                         <context link="tag" field="owner"/>
5170                                 </retrieve>
5171                                 <update permission="ADMIN_ACQ_FUND_TAG">
5172                                         <context link="tag" field="owner"/>
5173                                 </update>
5174                                 <delete permission="ADMIN_ACQ_FUND_TAG">
5175                                         <context link="tag" field="owner"/>
5176                                 </delete>
5177                         </actions>
5178                 </permacrud>
5179         </class>
5180
5181         <!-- ********************************************************************************************************************* -->
5182
5183 </IDL>
5184
5185 <!--
5186     vim:noet:ts=4:sw=4:
5187 -->