Moved to full Mojolicious app.

This commit is contained in:
Paul Dill 2017-02-24 19:27:43 +00:00
parent 2828998a32
commit 1eafaf4ab1
28 changed files with 2775 additions and 1158 deletions

View file

@ -0,0 +1,98 @@
use utf8;
package Pear::LocalLoop::Schema::Result::AccountToken;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::AccountToken
=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<AccountTokens>
=cut
__PACKAGE__->table("AccountTokens");
=head1 ACCESSORS
=head2 accounttokenid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 accounttokenname
data_type: 'text'
is_nullable: 0
=head2 used
data_type: 'integer'
default_value: 0
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"accounttokenid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"accounttokenname",
{ data_type => "text", is_nullable => 0 },
"used",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</accounttokenid>
=back
=cut
__PACKAGE__->set_primary_key("accounttokenid");
=head1 UNIQUE CONSTRAINTS
=head2 C<accounttokenname_unique>
=over 4
=item * L</accounttokenname>
=back
=cut
__PACKAGE__->add_unique_constraint("accounttokenname_unique", ["accounttokenname"]);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MeN6dMZY0drrWk+En7E5Ag
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,92 @@
use utf8;
package Pear::LocalLoop::Schema::Result::Administrator;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::Administrator
=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<Administrators>
=cut
__PACKAGE__->table("Administrators");
=head1 ACCESSORS
=head2 userid
data_type: 'integer'
is_auto_increment: 1
is_foreign_key: 1
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"userid",
{
data_type => "integer",
is_auto_increment => 1,
is_foreign_key => 1,
is_nullable => 0,
},
);
=head1 PRIMARY KEY
=over 4
=item * L</userid>
=back
=cut
__PACKAGE__->set_primary_key("userid");
=head1 RELATIONS
=head2 userid
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->belongs_to(
"userid",
"Pear::LocalLoop::Schema::Result::User",
{ userid => "userid" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YLzlp1ru+1id/O4bTJGqbw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,107 @@
use utf8;
package Pear::LocalLoop::Schema::Result::AgeRange;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::AgeRange
=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<AgeRanges>
=cut
__PACKAGE__->table("AgeRanges");
=head1 ACCESSORS
=head2 agerangeid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 agerangestring
data_type: 'text'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"agerangeid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"agerangestring",
{ data_type => "text", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</agerangeid>
=back
=cut
__PACKAGE__->set_primary_key("agerangeid");
=head1 UNIQUE CONSTRAINTS
=head2 C<agerangestring_unique>
=over 4
=item * L</agerangestring>
=back
=cut
__PACKAGE__->add_unique_constraint("agerangestring_unique", ["agerangestring"]);
=head1 RELATIONS
=head2 customers
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::Customer>
=cut
__PACKAGE__->has_many(
"customers",
"Pear::LocalLoop::Schema::Result::Customer",
{ "foreign.agerange_fk" => "self.agerangeid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4zGNm0RlwptF9hlj9oErVA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,137 @@
use utf8;
package Pear::LocalLoop::Schema::Result::Customer;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::Customer
=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<Customers>
=cut
__PACKAGE__->table("Customers");
=head1 ACCESSORS
=head2 customerid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 username
data_type: 'text'
is_nullable: 0
=head2 agerange_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 postcode
data_type: 'text'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"customerid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"username",
{ data_type => "text", is_nullable => 0 },
"agerange_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"postcode",
{ data_type => "text", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</customerid>
=back
=cut
__PACKAGE__->set_primary_key("customerid");
=head1 UNIQUE CONSTRAINTS
=head2 C<username_unique>
=over 4
=item * L</username>
=back
=cut
__PACKAGE__->add_unique_constraint("username_unique", ["username"]);
=head1 RELATIONS
=head2 agerange_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::AgeRange>
=cut
__PACKAGE__->belongs_to(
"agerange_fk",
"Pear::LocalLoop::Schema::Result::AgeRange",
{ agerangeid => "agerange_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
=head2 user
Type: might_have
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->might_have(
"user",
"Pear::LocalLoop::Schema::Result::User",
{ "foreign.customerid_fk" => "self.customerid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ocoCGZYvw9O9wxzr14okiQ
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,122 @@
use utf8;
package Pear::LocalLoop::Schema::Result::Organisation;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::Organisation
=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<Organisations>
=cut
__PACKAGE__->table("Organisations");
=head1 ACCESSORS
=head2 organisationalid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 name
data_type: 'text'
is_nullable: 0
=head2 fulladdress
data_type: 'text'
is_nullable: 0
=head2 postcode
data_type: 'text'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"organisationalid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"name",
{ data_type => "text", is_nullable => 0 },
"fulladdress",
{ data_type => "text", is_nullable => 0 },
"postcode",
{ data_type => "text", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</organisationalid>
=back
=cut
__PACKAGE__->set_primary_key("organisationalid");
=head1 RELATIONS
=head2 transactions
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::Transaction>
=cut
__PACKAGE__->has_many(
"transactions",
"Pear::LocalLoop::Schema::Result::Transaction",
{ "foreign.sellerorganisationid_fk" => "self.organisationalid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 user
Type: might_have
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->might_have(
"user",
"Pear::LocalLoop::Schema::Result::User",
{ "foreign.organisationalid_fk" => "self.organisationalid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p9FzM/H5YQbo2d0lN/DfCg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,139 @@
use utf8;
package Pear::LocalLoop::Schema::Result::PendingOrganisation;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::PendingOrganisation
=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<PendingOrganisations>
=cut
__PACKAGE__->table("PendingOrganisations");
=head1 ACCESSORS
=head2 pendingorganisationid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 usersubmitted_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 timedatesubmitted
data_type: 'integer'
is_nullable: 0
=head2 name
data_type: 'text'
is_nullable: 0
=head2 fulladdress
data_type: 'text'
is_nullable: 1
=head2 postcode
data_type: 'text'
is_nullable: 1
=cut
__PACKAGE__->add_columns(
"pendingorganisationid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"usersubmitted_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"timedatesubmitted",
{ data_type => "datetime", is_nullable => 0 },
"name",
{ data_type => "text", is_nullable => 0 },
"fulladdress",
{ data_type => "text", is_nullable => 1 },
"postcode",
{ data_type => "text", is_nullable => 1 },
);
=head1 PRIMARY KEY
=over 4
=item * L</pendingorganisationid>
=back
=cut
__PACKAGE__->set_primary_key("pendingorganisationid");
=head1 RELATIONS
=head2 pending_transactions
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::PendingTransaction>
=cut
__PACKAGE__->has_many(
"pending_transactions",
"Pear::LocalLoop::Schema::Result::PendingTransaction",
{
"foreign.pendingsellerorganisationid_fk" => "self.pendingorganisationid",
},
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 usersubmitted_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->belongs_to(
"usersubmitted_fk",
"Pear::LocalLoop::Schema::Result::User",
{ userid => "usersubmitted_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ekEOt+ESCwQxrqqlMurehA
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,152 @@
use utf8;
package Pear::LocalLoop::Schema::Result::PendingTransaction;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::PendingTransaction
=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<PendingTransactions>
=cut
__PACKAGE__->table("PendingTransactions");
=head1 ACCESSORS
=head2 pendingtransactionid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 buyeruserid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 pendingsellerorganisationid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 valuemicrocurrency
data_type: 'integer'
is_nullable: 0
=head2 proofimage
data_type: 'text'
is_nullable: 0
=head2 timedatesubmitted
data_type: 'integer'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"pendingtransactionid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"buyeruserid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"pendingsellerorganisationid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"valuemicrocurrency",
{ data_type => "integer", is_nullable => 0 },
"proofimage",
{ data_type => "text", is_nullable => 0 },
"timedatesubmitted",
{ data_type => "datetime", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</pendingtransactionid>
=back
=cut
__PACKAGE__->set_primary_key("pendingtransactionid");
=head1 UNIQUE CONSTRAINTS
=head2 C<proofimage_unique>
=over 4
=item * L</proofimage>
=back
=cut
__PACKAGE__->add_unique_constraint("proofimage_unique", ["proofimage"]);
=head1 RELATIONS
=head2 buyeruserid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->belongs_to(
"buyeruserid_fk",
"Pear::LocalLoop::Schema::Result::User",
{ userid => "buyeruserid_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
=head2 pendingsellerorganisationid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::PendingOrganisation>
=cut
__PACKAGE__->belongs_to(
"pendingsellerorganisationid_fk",
"Pear::LocalLoop::Schema::Result::PendingOrganisation",
{ pendingorganisationid => "pendingsellerorganisationid_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zwtxzfW5uB4FNA6mKdFOvg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,122 @@
use utf8;
package Pear::LocalLoop::Schema::Result::SessionToken;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::SessionToken
=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<SessionTokens>
=cut
__PACKAGE__->table("SessionTokens");
=head1 ACCESSORS
=head2 sessiontokenid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 sessiontokenname
data_type: 'text'
is_nullable: 0
=head2 useridassignedto_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 expiredatetime
data_type: 'integer'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"sessiontokenid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"sessiontokenname",
{ data_type => "text", is_nullable => 0 },
"useridassignedto_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"expiredatetime",
{ data_type => "datetime", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</sessiontokenid>
=back
=cut
__PACKAGE__->set_primary_key("sessiontokenid");
=head1 UNIQUE CONSTRAINTS
=head2 C<sessiontokenname_unique>
=over 4
=item * L</sessiontokenname>
=back
=cut
__PACKAGE__->add_unique_constraint("sessiontokenname_unique", ["sessiontokenname"]);
=head1 RELATIONS
=head2 useridassignedto_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->belongs_to(
"useridassignedto_fk",
"Pear::LocalLoop::Schema::Result::User",
{ userid => "useridassignedto_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/mNAPeSmfsDSIpey+eUucg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,152 @@
use utf8;
package Pear::LocalLoop::Schema::Result::Transaction;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::Transaction
=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<Transactions>
=cut
__PACKAGE__->table("Transactions");
=head1 ACCESSORS
=head2 transactionid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 buyeruserid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 sellerorganisationid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 valuemicrocurrency
data_type: 'integer'
is_nullable: 0
=head2 proofimage
data_type: 'text'
is_nullable: 0
=head2 timedatesubmitted
data_type: 'integer'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"transactionid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"buyeruserid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"sellerorganisationid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"valuemicrocurrency",
{ data_type => "integer", is_nullable => 0 },
"proofimage",
{ data_type => "text", is_nullable => 0 },
"timedatesubmitted",
{ data_type => "datetime", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</transactionid>
=back
=cut
__PACKAGE__->set_primary_key("transactionid");
=head1 UNIQUE CONSTRAINTS
=head2 C<proofimage_unique>
=over 4
=item * L</proofimage>
=back
=cut
__PACKAGE__->add_unique_constraint("proofimage_unique", ["proofimage"]);
=head1 RELATIONS
=head2 buyeruserid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::User>
=cut
__PACKAGE__->belongs_to(
"buyeruserid_fk",
"Pear::LocalLoop::Schema::Result::User",
{ userid => "buyeruserid_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
=head2 sellerorganisationid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::Organisation>
=cut
__PACKAGE__->belongs_to(
"sellerorganisationid_fk",
"Pear::LocalLoop::Schema::Result::Organisation",
{ organisationalid => "sellerorganisationid_fk" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CfPoE2egoSD1tKo7fYjZdg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View file

@ -0,0 +1,261 @@
use utf8;
package Pear::LocalLoop::Schema::Result::User;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Pear::LocalLoop::Schema::Result::User
=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<Users>
=cut
__PACKAGE__->table("Users");
=head1 ACCESSORS
=head2 userid
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 customerid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 organisationalid_fk
data_type: 'integer'
is_foreign_key: 1
is_nullable: 1
=head2 email
data_type: 'text'
is_nullable: 0
=head2 joindate
data_type: 'integer'
is_nullable: 0
=head2 hashedpassword
data_type: 'text'
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"userid",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"customerid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"organisationalid_fk",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
"email",
{ data_type => "text", is_nullable => 0 },
"joindate",
{ data_type => "datetime", is_nullable => 0 },
"hashedpassword",
{ data_type => "text", is_nullable => 0 },
);
=head1 PRIMARY KEY
=over 4
=item * L</userid>
=back
=cut
__PACKAGE__->set_primary_key("userid");
=head1 UNIQUE CONSTRAINTS
=head2 C<customerid_fk_unique>
=over 4
=item * L</customerid_fk>
=back
=cut
__PACKAGE__->add_unique_constraint("customerid_fk_unique", ["customerid_fk"]);
=head2 C<email_unique>
=over 4
=item * L</email>
=back
=cut
__PACKAGE__->add_unique_constraint("email_unique", ["email"]);
=head2 C<organisationalid_fk_unique>
=over 4
=item * L</organisationalid_fk>
=back
=cut
__PACKAGE__->add_unique_constraint("organisationalid_fk_unique", ["organisationalid_fk"]);
=head1 RELATIONS
=head2 administrator
Type: might_have
Related object: L<Pear::LocalLoop::Schema::Result::Administrator>
=cut
__PACKAGE__->might_have(
"administrator",
"Pear::LocalLoop::Schema::Result::Administrator",
{ "foreign.userid" => "self.userid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 customerid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::Customer>
=cut
__PACKAGE__->belongs_to(
"customerid_fk",
"Pear::LocalLoop::Schema::Result::Customer",
{ customerid => "customerid_fk" },
{
is_deferrable => 0,
join_type => "LEFT",
on_delete => "NO ACTION",
on_update => "NO ACTION",
},
);
=head2 organisationalid_fk
Type: belongs_to
Related object: L<Pear::LocalLoop::Schema::Result::Organisation>
=cut
__PACKAGE__->belongs_to(
"organisationalid_fk",
"Pear::LocalLoop::Schema::Result::Organisation",
{ organisationalid => "organisationalid_fk" },
{
is_deferrable => 0,
join_type => "LEFT",
on_delete => "NO ACTION",
on_update => "NO ACTION",
},
);
=head2 pending_organisations
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::PendingOrganisation>
=cut
__PACKAGE__->has_many(
"pending_organisations",
"Pear::LocalLoop::Schema::Result::PendingOrganisation",
{ "foreign.usersubmitted_fk" => "self.userid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 pending_transactions
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::PendingTransaction>
=cut
__PACKAGE__->has_many(
"pending_transactions",
"Pear::LocalLoop::Schema::Result::PendingTransaction",
{ "foreign.buyeruserid_fk" => "self.userid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 session_tokens
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::SessionToken>
=cut
__PACKAGE__->has_many(
"session_tokens",
"Pear::LocalLoop::Schema::Result::SessionToken",
{ "foreign.useridassignedto_fk" => "self.userid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
=head2 transactions
Type: has_many
Related object: L<Pear::LocalLoop::Schema::Result::Transaction>
=cut
__PACKAGE__->has_many(
"transactions",
"Pear::LocalLoop::Schema::Result::Transaction",
{ "foreign.buyeruserid_fk" => "self.userid" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2017-02-24 17:32:21
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qjAgtJR1zaUr00HsiR1aPw
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;