#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::DB::Item::ArtistContractTermReserveRun;

use strict;
use warnings;

use lib '/app/tools/common/lib';
use Common::DB::Item;
use base 'Common::DB::Item';

use constant kTable => 'artist_contract_term_reserve_run';
use constant kDB => Common::DB::Item::kClientDB();

my $gConfig =
{
	_db => Common::DB::Item::kClientDB(),
	'artist_contract_term_reserve_id' =>
	{
		_table => kTable,
		_key => 1,
	},
	'artist_royalty_run_id' =>
	{
		_table => kTable,
		_key => 1,
	},
};


sub GetByArtistRoyaltyRunID
{
    my ($class, $id) = @_;

    my $sql = "SELECT * from " . kTable . " WHERE artist_royalty_run_id=$id";
    
    return $class->GetAll($sql);
}




sub DeleteByArtistRoyaltyRunID
{
    my ($class, $id) = @_;

    my $sql = "DELETE from " . kTable . " WHERE artist_royalty_run_id=$id";
	my $dbo = Common::RSApp::GetClientDB();
    $dbo->DoCmd($sql);

}



###
1;#
###



