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

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

=head1 NAME

CLMApp::Schema::Result::DistributorWarehouse

=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<DistributorWarehouse>

=cut

__PACKAGE__->table("DistributorWarehouse");

=head1 ACCESSORS

=head2 distributorwarehouseid

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

=head2 parentid

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 distributorwarehouseamphireid

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 distributorwarehousename

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 distributorlocid

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 cityname

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 state

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 siteshortname

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 latitude

  data_type: 'varchar'
  is_nullable: 1
  size: 15

=head2 longitude

  data_type: 'varchar'
  is_nullable: 1
  size: 15

=head2 address

  data_type: 'varchar'
  is_nullable: 1
  size: 200

=head2 zip

  data_type: 'varchar'
  is_nullable: 1
  size: 10

=head2 countrycode

  data_type: 'char'
  is_nullable: 1
  size: 3

=head2 distributorcompanyid

  data_type: 'integer'
  is_foreign_key: 1
  is_nullable: 0

=head2 active

  data_type: 'integer'
  default_value: 1
  is_nullable: 1

=head2 bplocationid

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=head2 clmactive

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 psmactive

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 arrowstreamid

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 arrowstreamname

  data_type: 'varchar'
  is_nullable: 1
  size: 255

=head2 dadcode

  data_type: 'varchar'
  is_nullable: 1
  size: 256

=cut

__PACKAGE__->add_columns(
  "distributorwarehouseid",
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
  "parentid",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "distributorwarehouseamphireid",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "distributorwarehousename",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "distributorlocid",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "cityname",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "state",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "siteshortname",
  { data_type => "varchar", is_nullable => 1, size => 50 },
  "latitude",
  { data_type => "varchar", is_nullable => 1, size => 15 },
  "longitude",
  { data_type => "varchar", is_nullable => 1, size => 15 },
  "address",
  { data_type => "varchar", is_nullable => 1, size => 200 },
  "zip",
  { data_type => "varchar", is_nullable => 1, size => 10 },
  "countrycode",
  { data_type => "char", is_nullable => 1, size => 3 },
  "active",
  { data_type => "integer", default_value => 1, is_nullable => 1 },
  "bplocationid",
  { data_type => "varchar", is_nullable => 1, size => 50 },  
  "distributorcompanyid",
  {
    data_type         => "integer",
    is_auto_increment => 0,
    is_foreign_key    => 1,
    is_nullable       => 0,
  },   
  "clmactive",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "psmactive",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "arrowstreamid",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "arrowstreamname",
  { data_type => "varchar", is_nullable => 1, size => 255 },
  "dadcode",
  { data_type => "varchar", is_nullable => 1, size => 256 },
);

=head1 PRIMARY KEY

=over 4

=item * L</distributorwarehouseid>

=back

=cut

__PACKAGE__->set_primary_key("distributorwarehouseid");


__PACKAGE__->belongs_to(
  "distributor",
  "CLMApp::Schema::Result::DistributorCompany",
  { "foreign.distributorcompanyid" => "self.distributorcompanyid" },
  { is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);

# __PACKAGE__->many_to_many(
#   "customer",
#   "CLMApp::Schema::Result::Customer",
#   { "foreign.distributorwarehouse" => "self.distributorlocid" },
#   { is_deferrable => 1, on_delete => "NO ACTION", on_update => "NO ACTION", join_type => 'left' },
# );

# Created by DBIx::Class::Schema::Loader v0.07039 @ 2017-05-06 14:53:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:73QcYXfD2a+TkxINn1XVeA


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