Add base classes for mailing instances.
This commit is contained in:
parent
63798b98f1
commit
6aa9df2170
3 changed files with 119 additions and 2 deletions
47
lib/WebGUI/Mailing.pm
Normal file
47
lib/WebGUI/Mailing.pm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
package WebGUI::Mailing;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base 'WebGUI::Crud';
|
||||
|
||||
sub crud_definition {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
||||
my $definition = $class->SUPER::crud_definition( $session );
|
||||
|
||||
$definition->{ tableName } = 'WGMailing';
|
||||
$definition->{ tableKey } = 'mailingId';
|
||||
$definition->{ sequenceKey } = 'issueId';
|
||||
|
||||
my %properties = (
|
||||
assetId => {
|
||||
fieldType => 'guid',
|
||||
},
|
||||
|
||||
issueId => {
|
||||
fieldType => 'guid',
|
||||
},
|
||||
configuration => {
|
||||
fieldType => 'textarea',
|
||||
},
|
||||
sendDate => {
|
||||
fieldType => 'dateTime',
|
||||
},
|
||||
active => {
|
||||
fieldType => 'yesNo',
|
||||
defaultValue => 0,
|
||||
},
|
||||
);
|
||||
|
||||
$definition->{ properties } = {
|
||||
%{ $definition->{ properties } || {} },
|
||||
%properties,
|
||||
};
|
||||
|
||||
return $definition;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue