From 819c3967f3843e815ea7fd96796b7a0f69d62055 Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Sat, 21 Jun 2014 16:00:07 +0000 Subject: re-dump schema --- lib/TFLMonitor/Schema.pm | 8 ++- lib/TFLMonitor/Schema/Line.pm | 82 ++++++++++++++++++++++++---- lib/TFLMonitor/Schema/LineStatus.pm | 104 ++++++++++++++++++++++++++---------- lib/TFLMonitor/Schema/Status.pm | 100 ++++++++++++++++++++++++---------- 4 files changed, 224 insertions(+), 70 deletions(-) diff --git a/lib/TFLMonitor/Schema.pm b/lib/TFLMonitor/Schema.pm index c5e2377..d352bde 100644 --- a/lib/TFLMonitor/Schema.pm +++ b/lib/TFLMonitor/Schema.pm @@ -1,5 +1,9 @@ +use utf8; package TFLMonitor::Schema; +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + use strict; use warnings; @@ -8,8 +12,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04006 @ 2010-06-21 23:15:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Du/rUVC8IdRUPtkgGVjM/A +# Created by DBIx::Class::Schema::Loader v0.04006 @ 2014-06-21 15:59:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:am9Ja/HwjjspkyaGHP+xIw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/lib/TFLMonitor/Schema/Line.pm b/lib/TFLMonitor/Schema/Line.pm index 5cf6e64..cbccbe7 100644 --- a/lib/TFLMonitor/Schema/Line.pm +++ b/lib/TFLMonitor/Schema/Line.pm @@ -1,34 +1,94 @@ +use utf8; package TFLMonitor::Schema::Line; +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +TFLMonitor::Schema::Line + +=cut + use strict; use warnings; -use base 'DBIx::Class'; +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut -__PACKAGE__->load_components("Core"); __PACKAGE__->table("line"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'int' + is_nullable: 0 + +=head2 name + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=cut + __PACKAGE__->add_columns( "id", - { data_type => "INT", default_value => undef, is_nullable => 1, size => undef }, + { data_type => "int", is_nullable => 0 }, "name", - { - data_type => "VARCHAR", - default_value => undef, - is_nullable => 0, - size => 255, - }, + { data_type => "varchar", is_nullable => 0, size => 255 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("name_unique", ["name"]); + +=head1 RELATIONS + +=head2 line_statuses + +Type: has_many + +Related object: L + +=cut + __PACKAGE__->has_many( "line_statuses", "TFLMonitor::Schema::LineStatus", { "foreign.line_id" => "self.id" }, + undef, ); -# Created by DBIx::Class::Schema::Loader v0.04006 @ 2010-06-21 23:15:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZwKNYS6AzGFRfM7vnAMqTQ +# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-06-21 15:59:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wkLwtPnKtkjsrMtvsUzijw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/lib/TFLMonitor/Schema/LineStatus.pm b/lib/TFLMonitor/Schema/LineStatus.pm index c6bb3c2..1718bad 100644 --- a/lib/TFLMonitor/Schema/LineStatus.pm +++ b/lib/TFLMonitor/Schema/LineStatus.pm @@ -1,45 +1,91 @@ +use utf8; package TFLMonitor::Schema::LineStatus; +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +TFLMonitor::Schema::LineStatus + +=cut + use strict; use warnings; -use base 'DBIx::Class'; +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut -__PACKAGE__->load_components("Core"); __PACKAGE__->table("line_status"); + +=head1 ACCESSORS + +=head2 time + + data_type: 'datetime' + is_nullable: 0 + +=head2 line_id + + data_type: 'int' + is_foreign_key: 1 + is_nullable: 0 + +=head2 status_code + + data_type: 'varchar' + is_foreign_key: 1 + is_nullable: 0 + size: 255 + +=head2 is_active + + data_type: 'boolean' + is_nullable: 0 + +=head2 details + + data_type: 'text' + is_nullable: 1 + +=cut + __PACKAGE__->add_columns( "time", - { - data_type => "DATETIME", - default_value => undef, - is_nullable => 0, - size => undef, - }, + { data_type => "datetime", is_nullable => 0 }, "line_id", - { data_type => "INT", default_value => undef, is_nullable => 0, size => undef }, + { data_type => "int", is_foreign_key => 1, is_nullable => 0 }, "status_code", - { - data_type => "VARCHAR", - default_value => undef, - is_nullable => 0, - size => 255, - }, + { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 255 }, "is_active", - { - data_type => "BOOLEAN", - default_value => undef, - is_nullable => 0, - size => undef, - }, + { data_type => "boolean", is_nullable => 0 }, "details", - { - data_type => "TEXT", - default_value => undef, - is_nullable => 1, - size => undef, - }, + { data_type => "text", is_nullable => 1 }, ); + +=head1 RELATIONS + +=head2 line_id + +Type: belongs_to + +Related object: L + +=cut + __PACKAGE__->belongs_to("line_id", "TFLMonitor::Schema::Line", { id => "line_id" }); + +=head2 status_code + +Type: belongs_to + +Related object: L + +=cut + __PACKAGE__->belongs_to( "status_code", "TFLMonitor::Schema::Status", @@ -47,8 +93,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04006 @ 2010-06-21 23:15:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1b6y2NC79YSXgyECT4uEzQ +# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-06-21 15:59:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IwWvmSHYpZfObvzpX/oTNQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/lib/TFLMonitor/Schema/Status.pm b/lib/TFLMonitor/Schema/Status.pm index f36acda..b23112b 100644 --- a/lib/TFLMonitor/Schema/Status.pm +++ b/lib/TFLMonitor/Schema/Status.pm @@ -1,52 +1,96 @@ +use utf8; package TFLMonitor::Schema::Status; +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +TFLMonitor::Schema::Status + +=cut + use strict; use warnings; -use base 'DBIx::Class'; +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut -__PACKAGE__->load_components("Core"); __PACKAGE__->table("status"); + +=head1 ACCESSORS + +=head2 code + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 class + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 description + + data_type: 'varchar' + is_nullable: 0 + size: 255 + +=head2 is_active + + data_type: 'boolean' + is_nullable: 0 + +=cut + __PACKAGE__->add_columns( "code", - { - data_type => "VARCHAR", - default_value => undef, - is_nullable => 1, - size => 255, - }, + { data_type => "varchar", is_nullable => 0, size => 255 }, "class", - { - data_type => "VARCHAR", - default_value => undef, - is_nullable => 0, - size => 255, - }, + { data_type => "varchar", is_nullable => 0, size => 255 }, "description", - { - data_type => "VARCHAR", - default_value => undef, - is_nullable => 0, - size => 255, - }, + { data_type => "varchar", is_nullable => 0, size => 255 }, "is_active", - { - data_type => "BOOLEAN", - default_value => undef, - is_nullable => 0, - size => undef, - }, + { data_type => "boolean", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("code"); + +=head1 RELATIONS + +=head2 line_statuses + +Type: has_many + +Related object: L + +=cut + __PACKAGE__->has_many( "line_statuses", "TFLMonitor::Schema::LineStatus", { "foreign.status_code" => "self.code" }, + undef, ); -# Created by DBIx::Class::Schema::Loader v0.04006 @ 2010-06-21 23:15:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HllgP4wdCoe4KqxmyI0m8Q +# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-06-21 15:59:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HnGrq0P/6TEdHwejka2OVQ # You can replace this text with custom content, and it will be preserved on regeneration -- cgit v1.2.3