adding support for non-cat inhouse use
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Aug 2006 14:50:02 +0000 (14:50 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 25 Aug 2006 14:50:02 +0000 (14:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5671 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/dbi.pm
Open-ILS/src/sql/Pg/090.schema.action.sql

index 0b9007a..046570f 100644 (file)
                        <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
                </links>
        </class>
+       <class id="ancihu" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use">
+               <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
+                       <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
+                       <field name="ischanged" oils_obj:array_position="1" oils_persist:virtual="true" />
+                       <field name="isdeleted" oils_obj:array_position="2" oils_persist:virtual="true" />
+                       <field name="id" oils_obj:array_position="3" oils_persist:virtual="false" />
+                       <field name="item_type" oils_obj:array_position="4" oils_persist:virtual="false" />
+                       <field name="org_unit" oils_obj:array_position="5" oils_persist:virtual="false" />
+                       <field name="staff" oils_obj:array_position="6" oils_persist:virtual="false" />
+                       <field name="use_time" oils_obj:array_position="7" oils_persist:virtual="false" />
+               </fields>
+               <links>
+                       <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
+                       <link field="staff" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
+               </links>
+       </class>
        <class id="atc" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy">
                <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
                        <field name="isnew" oils_obj:array_position="0" oils_persist:virtual="true" />
index 61d1f46..95da045 100644 (file)
@@ -13,6 +13,13 @@ __PACKAGE__->columns(Primary => 'id');
 __PACKAGE__->columns(Essential => qw/item staff org_unit use_time/);
 #-------------------------------------------------------------------------------
 
+package action::non_cat_in_house_use;
+use base qw/action/;
+__PACKAGE__->table('action_non_cat_in_house_use');
+__PACKAGE__->columns(Primary => 'id');
+__PACKAGE__->columns(Essential => qw/item_type staff org_unit use_time/);
+#-------------------------------------------------------------------------------
+
 package action::non_cataloged_circulation;
 use base qw/action/;
 __PACKAGE__->table('action_non_cataloged_circulation');
index f06a6a8..956bc18 100644 (file)
        action::circulation->sequence( 'money.billable_xact_id_seq' );
 
        #---------------------------------------------------------------------
+       package action::non_cat_in_house_use;
+       
+       action::non_cat_in_house_use->table( 'action.non_cat_in_house_use' );
+       action::non_cat_in_house_use->sequence( 'action.non_cat_in_house_use_id_seq' );
+
+       #---------------------------------------------------------------------
        package action::in_house_use;
        
        action::in_house_use->table( 'action.in_house_use' );
index e180d32..84eccec 100644 (file)
@@ -21,6 +21,14 @@ CREATE TABLE action.non_cataloged_circulation (
        circ_time       TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW()
 );
 
+CREATE TABLE action.non_cat_in_house_use (
+       id              SERIAL                          PRIMARY KEY,
+       item_type       BIGINT                          NOT NULL REFERENCES config.non_cataloged_type(id),
+       staff           INT                             NOT NULL REFERENCES actor.usr (id),
+       org_unit        INT                             NOT NULL REFERENCES actor.org_unit (id),
+       use_time        TIMESTAMP WITH TIME ZONE        NOT NULL DEFAULT NOW()
+);
+
 CREATE TABLE action.survey (
        id              SERIAL                          PRIMARY KEY,
        owner           INT                             NOT NULL REFERENCES actor.org_unit (id),