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

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

=head1 NAME

CLMApp::Schema::Result::BackOfficeSystem

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

=cut

__PACKAGE__->table("BackOfficeSystem");

=head1 ACCESSORS

=head2 systemid

  data_type: 'integer'
  is_auto_increment: 1
  is_foreign_key: 1
  is_nullable: 0

=head2 systemname

  data_type: 'varchar'
  is_nullable: 0
  size: 100

=head2 active

  data_type: 'tinyint'
  is_nullable: 0

=head2 default0

  data_type: 'varchar'
  is_nullable: 1
  size: 150

=head2 ack

  data_type: 'tinyint'
  is_nullable: 1

=head2 conf

  data_type: 'tinyint'
  is_nullable: 1

=head2 inv

  data_type: 'tinyint'
  is_nullable: 1

=head2 cat

  data_type: 'tinyint'
  is_nullable: 1

=head2 description

  data_type: 'longtext'
  is_nullable: 1

=head2 chaingroupamphireCan't load application from file "/home/sites/dmadelivers.com/clm/www/clmapp/script/clmapp": DBIx::Class::Schema::catch {...} (): Attempt to load_namespaces() class CLMApp::Schema::Result::BackOfficeSystem failed - are you sure this is a real Result Class?: Can't locate object method "result_source_instance" via package "CLMApp::Schema::Result::BackOfficeSystem" at /usr/share/perl5/DBIx/Class/Schema.pm line 200. at /home/sites/dmadelivers.com/clm/www/clmapp/script/../lib/CLMApp/Schema.pm line 12
id

  data_type: 'integer'
  is_nullable: 1

=head2 chainconceptamphireid

  data_type: 'varchar'
  is_nullable: 1
  size: 50

=cut

__PACKAGE__->add_columns(
  "systemid",
  {
    data_type         => "integer",
    is_auto_increment => 1,
    is_foreign_key    => 1,
    is_nullable       => 0,
  },
  "systemname",
  { data_type => "varchar", is_nullable => 0, size => 100 },
  "active",
  { data_type => "tinyint", is_nullable => 0 },
  "ack",
  { data_type => "tinyint", is_nullable => 1 },
  "conf",
  { data_type => "tinyint", is_nullable => 1 },
  "inv",
  { data_type => "tinyint", is_nullable => 1 },
  "cat",
  { data_type => "tinyint", is_nullable => 1 },
  "description",
  { data_type => "longtext", is_nullable => 1 },
  "chaingroupamphireid",
  { data_type => "integer", is_nullable => 1 },
  "chaingroupid",
  {
    data_type         => "integer",
    is_auto_increment => 0,
    is_foreign_key    => 1,
    is_nullable       => 1,
  },
);

=head1 PRIMARY KEY

=over 4

=item * L</systemid>

=back

=cut

__PACKAGE__->set_primary_key("systemid");

=head1 RELATIONS

=head2 back_office_system_chain_concepts

Type: has_many

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

=cut




__PACKAGE__->has_many(
  "back_office_system_chain_concepts",
  "CLMApp::Schema::Result::BackOfficeSystemChainConcept",
  { "foreign.systemid" => "self.systemid" },
  { cascade_copy => 0, cascade_delete => 1 },
);

__PACKAGE__->many_to_many(
  "chainconcepts" => "back_office_system_chain_concepts", "chain_concept"
);
=head2 systemid

Type: belongs_to

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

=cut

__PACKAGE__->belongs_to(
  "backofficesystemchainconcept",
  "CLMApp::Schema::Result::BackOfficeSystemChainConcept",
  { systemid => "systemid" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
);




=head1 RELATIONS

=head2 back_office_system_chain_concepts

Type: has_many

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

=cut

__PACKAGE__->has_many(
  "back_office_system_customers",
  "CLMApp::Schema::Result::BackOfficeSystemCustomer",
  { "foreign.systemid" => "self.systemid" },
  { cascade_copy => 0, cascade_delete => 0 },
);


__PACKAGE__->many_to_many(
  "customers" => "back_office_system_customers", "customer"
);
=head2 systemid

Type: belongs_to

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

=cut

__PACKAGE__->belongs_to(
  "backofficesystemcustomer",
  "CLMApp::Schema::Result::BackOfficeSystemCustomer",
  { systemid => "systemid" },
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
);

# Created by DBIx::Class::Schema::Loader v0.07039 @ 2017-06-01 23:07:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ii6K6KMmMv41lHjwVcsB/A


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