use utf8;
package CLMApp::Schema::Result::EmailNotification;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

=head1 NAME

CLMApp::Schema::Result::EmailNotification

=cut

use strict;
use warnings;

use base 'DBIx::Class::Core';

=head1 COMPONENTS LOADED

=over 4

=item * L<DBIx::Class::InflateColumn::DateTime>

=back

=cut

__PACKAGE__->load_components("InflateColumn::DateTime");

=head1 TABLE: C<EmailNotification>

=cut

__PACKAGE__->table("EmailNotification");

=head1 ACCESSORS

=head2 emailnotificationid

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

=head2 name

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 actiontype

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 chaingroupid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 chainconceptid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 distributorcompanyid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 distributorwarehouseid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 systemid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 targetlist

  data_type: 'text'
  is_nullable: 1

=head2 precode

  data_type: 'text'
  is_nullable: 1

=head2 postcode

  data_type: 'text'
  is_nullable: 1

=head2 active

  data_type: 'integer'
  default_value: 1
  is_nullable: 1

=head2 deleted

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 subject

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 body

  data_type: 'text'
  is_nullable: 1

=cut

__PACKAGE__->add_columns(
  "emailnotificationid",
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
  "name",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "actiontype",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "chaingroupid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "chainconceptid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "distributorcompanyid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "distributorwarehouseid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "systemid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "targetlist",
  { data_type => "text", is_nullable => 1 },
  "precode",
  { data_type => "text", is_nullable => 1 },
  "postcode",
  { data_type => "text", is_nullable => 1 },
  "active",
  { data_type => "integer", default_value => 1, is_nullable => 1 },
  "deleted",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "subject",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "body",
  { data_type => "text", is_nullable => 1 },
);

=head1 PRIMARY KEY

=over 4

=item * L</emailnotificationid>

=back

=cut

__PACKAGE__->set_primary_key("emailnotificationid");

=head1 RELATIONS

=head2 email_notification_warehouses

Type: has_many

Related object: L<CLMApp::Schema::Result::EmailNotificationWarehouse>

=cut

__PACKAGE__->has_many(
  "email_notification_warehouses",
  "CLMApp::Schema::Result::EmailNotificationWarehouse",
  { "foreign.emailnotificationid" => "self.emailnotificationid" },
  { cascade_copy => 0, cascade_delete => 0 },
);


# Created by DBIx::Class::Schema::Loader v0.07039 @ 2019-01-03 09:50:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wLdMHwTw9/YusXUPkYZrOw

# __PACKAGE__->belongs_to(
#   "chainconcepts",
#   "CLMApp::Schema::Result::ChainConcept",
#   { "foreign.chainconceptid" => "self.chainconceptid" },
#   { cascade_copy => 0, cascade_delete => 0 },
# );

# __PACKAGE__->belongs_to(
#   "chaingroups",
#   "CLMApp::Schema::Result::ChainGroup",
#   { "foreign.chaingroupid" => "self.chaingroupid" },
#   { cascade_copy => 0, cascade_delete => 0 },
# );

# _PACKAGE__->belongs_to(
#   "distributors",
#   "CLMApp::Schema::Result::DistributorCompany",
#   { "foreign.distributorcompanyid" => "self.distributorcompanyid" },
#   { cascade_copy => 0, cascade_delete => 0 },
# );

# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
