Peace::DAO::Customer - The database access object of customer.
my $customer_dao = Peace::DAO::Customer->new(
dbh => $dbh,
);
$customer_dao->create( customer => $customer );
my $customer = $customer_dao->recover_by_uuid(
uuid => $uuid,
);
Peace::DAO::Customer allows you to make database operations over the customers table like recover or create.
Peace::DAO::Customer implements the following instance methods:
my $customer_dao = Peace::DAO::Customer->new(
dbh => $dbh,
);
Takes a database handle and instances a Peace::DAO::Customer object.
$customer_dao->create(
customer => $customer,
);
Takes a Peace::Model::Customer object and creates its database representation.
As a side effect sets the fields uuid and date_creation in the passed object.
my $customer = $customer_dao->recover_by_uuid(
uuid => $uuid,
);