#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::DB::Item::ArtistRoyaltyTransaction;
use strict;
use warnings;
use lib '/app/tools/common/lib';
use Common::Assert;
use Common::DB::Item;
use base 'Common::DB::Item';

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

sub GetByArtistRoyaltyStatementID {
    my ( $class, $stmtID ) = @_;
    assert($stmtID);

    my $sql = "SELECT * FROM " . kTable . " WHERE artist_royalty_statement_id=$stmtID";

    return $class->GetAll($sql);
}

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

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

1;
