Advertisement
Guest User

Untitled

a guest
Aug 27th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.95 KB | None | 0 0
  1. package SMM::Schema::Result::Organization;
  2.  
  3. # Created by DBIx::Class::Schema::Loader
  4. # DO NOT MODIFY THE FIRST PART OF THIS FILE
  5.  
  6. =head1 NAME
  7.  
  8. SMM::Schema::Result::Organization
  9.  
  10. =cut
  11.  
  12. use strict;
  13. use warnings;
  14.  
  15. use Moose;
  16. use MooseX::NonMoose;
  17. use MooseX::MarkAsMethods autoclean => 1;
  18. extends 'DBIx::Class::Core';
  19.  
  20. =head1 COMPONENTS LOADED
  21.  
  22. =over 4
  23.  
  24. =item * L<DBIx::Class::InflateColumn::DateTime>
  25.  
  26. =item * L<DBIx::Class::TimeStamp>
  27.  
  28. =item * L<DBIx::Class::PassphraseColumn>
  29.  
  30. =back
  31.  
  32. =cut
  33.  
  34. __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp", "PassphraseColumn");
  35.  
  36. =head1 TABLE: C<organization>
  37.  
  38. =cut
  39.  
  40. __PACKAGE__->table("organization");
  41.  
  42. =head1 ACCESSORS
  43.  
  44. =head2 id
  45.  
  46.   data_type: 'integer'
  47.   is_auto_increment: 1
  48.   is_nullable: 0
  49.   sequence: 'organization_id_seq'
  50.  
  51. =head2 name
  52.  
  53.   data_type: 'text'
  54.   is_nullable: 0
  55.  
  56. =head2 address
  57.  
  58.   data_type: 'text'
  59.   is_nullable: 1
  60.  
  61. =head2 postal_code
  62.  
  63.   data_type: 'text'
  64.   is_nullable: 1
  65.  
  66. =head2 city_id
  67.  
  68.   data_type: 'integer'
  69.   is_foreign_key: 1
  70.   is_nullable: 1
  71.  
  72. =head2 description
  73.  
  74.   data_type: 'text'
  75.   is_nullable: 1
  76.  
  77. =head2 email
  78.  
  79.   data_type: 'text'
  80.   is_nullable: 1
  81.  
  82. =head2 website
  83.  
  84.   data_type: 'text'
  85.   is_nullable: 1
  86.  
  87. =head2 phone
  88.  
  89.   data_type: 'text'
  90.   is_nullable: 1
  91.  
  92. =head2 number
  93.  
  94.   data_type: 'text'
  95.   is_nullable: 1
  96.  
  97. =head2 complement
  98.  
  99.   data_type: 'text'
  100.   is_nullable: 1
  101.  
  102. =cut
  103.  
  104. __PACKAGE__->add_columns(
  105.   "id",
  106.   {
  107.     data_type         => "integer",
  108.     is_auto_increment => 1,
  109.     is_nullable       => 0,
  110.     sequence          => "organization_id_seq",
  111.   },
  112.   "name",
  113.   { data_type => "text", is_nullable => 0 },
  114.   "address",
  115.   { data_type => "text", is_nullable => 1 },
  116.   "postal_code",
  117.   { data_type => "text", is_nullable => 1 },
  118.   "city_id",
  119.   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
  120.   "description",
  121.   { data_type => "text", is_nullable => 1 },
  122.   "email",
  123.   { data_type => "text", is_nullable => 1 },
  124.   "website",
  125.   { data_type => "text", is_nullable => 1 },
  126.   "phone",
  127.   { data_type => "text", is_nullable => 1 },
  128.   "number",
  129.   { data_type => "text", is_nullable => 1 },
  130.   "complement",
  131.   { data_type => "text", is_nullable => 1 },
  132. );
  133.  
  134. =head1 PRIMARY KEY
  135.  
  136. =over 4
  137.  
  138. =item * L</id>
  139.  
  140. =back
  141.  
  142. =cut
  143.  
  144. __PACKAGE__->set_primary_key("id");
  145.  
  146. =head1 RELATIONS
  147.  
  148. =head2 city
  149.  
  150. Type: belongs_to
  151.  
  152. Related object: L<SMM::Schema::Result::City>
  153.  
  154. =cut
  155.  
  156. __PACKAGE__->belongs_to(
  157.   "city",
  158.   "SMM::Schema::Result::City",
  159.   { id => "city_id" },
  160.   {
  161.     is_deferrable => 0,
  162.     join_type     => "LEFT",
  163.     on_delete     => "NO ACTION",
  164.     on_update     => "NO ACTION",
  165.   },
  166. );
  167.  
  168.  
  169. # Created by DBIx::Class::Schema::Loader v0.07041 @ 2014-08-27 12:54:45
  170. # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k06H3xu7s/YBsAcMh5xFHg
  171.  
  172.  
  173. # You can replace this text with custom code or comments, and it will be preserved on regeneration
  174. __PACKAGE__->meta->make_immutable;
  175. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement