nuther check point

This commit is contained in:
David Delikat 2009-03-18 17:50:56 +00:00
parent e6fc38a502
commit 3c56bb64ae
4 changed files with 371 additions and 23 deletions

View file

@ -0,0 +1,80 @@
package WebGUI::AssetCollateral::Sku::Ad::Ad;
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=cut
use strict;
use base WebGUI::Crud;
#------------------------------------------------
=head crud_definition
defines the field this crud will contain
userID => the id of the user that purchased the ad
transactionItemid => the id if the transaction item that completes this purchase
adId => th id if the ad purchased
clicksPurchased => the number of clicks the user purchased
impressionsPurchased => the number of impressions the user purchased
storedImage => temp storage for the image
isRenewal => indicates if this purchase is a renewal -- are the counts increased or just assigned
isDeleted => boolean that indicates whether the ad has been deleted from the system
=cut
sub crud_definition {
my ($class, $session) = @_;
my $definition = $class->SUPER::crud_definition($session);
$definition->{tableName} = 'adSkuPurchase';
$definition->{tableKey} = 'userId';
$definition->{properties} = {
userId => {
fieldType => 'user',
defaultValue => undef,
},
transactionItemid => {
fieldType => 'guid',
defaultValue => undef,
},
adId => {
fieldType => 'guid',
defaultValue => undef,
},
clicksPurchased => {
fieldType => 'integer',
defaultValue => undef,
},
impressionsPurchased => {
fieldType => 'integer',
defaultValue => undef,
},
storedImage => {
fieldType => 'guid',
defaultValue => undef,
},
isRenewal => {
fieldType => 'yesNo',
defaultValue => 0,
},
isDeleted => {
fieldType => 'yesNo',
defaultValue => 0,
},
};
return $definition;
}