]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Schema/Result/Account.pm
8e55393f2f67a0c5bc92729a19bee7cd92d34001
[chaz/chatty] / lib / Chatty / Schema / Result / Account.pm
1 package Chatty::Schema::Result::Account;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use Moose;
10 use MooseX::NonMoose;
11 use namespace::autoclean;
12 extends 'DBIx::Class::Core';
13
14 __PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp");
15
16 =head1 NAME
17
18 Chatty::Schema::Result::Account
19
20 =cut
21
22 __PACKAGE__->table("account");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
31
32 =head2 email
33
34 data_type: 'text'
35 is_nullable: 1
36
37 =head2 username
38
39 data_type: 'text'
40 is_nullable: 1
41
42 =head2 password
43
44 data_type: 'text'
45 is_nullable: 0
46
47 =head2 status
48
49 data_type: 'text'
50 default_value: 'active'
51 is_nullable: 1
52
53 =cut
54
55 __PACKAGE__->add_columns(
56 "id",
57 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
58 "email",
59 { data_type => "text", is_nullable => 1 },
60 "username",
61 { data_type => "text", is_nullable => 1 },
62 "password",
63 { data_type => "text", is_nullable => 0 },
64 "status",
65 { data_type => "text", default_value => "active", is_nullable => 1 },
66 );
67 __PACKAGE__->set_primary_key("id");
68 __PACKAGE__->add_unique_constraint("username_unique", ["username"]);
69
70 =head1 RELATIONS
71
72 =head2 messages
73
74 Type: has_many
75
76 Related object: L<Chatty::Schema::Result::Message>
77
78 =cut
79
80 __PACKAGE__->has_many(
81 "messages",
82 "Chatty::Schema::Result::Message",
83 { "foreign.author" => "self.id" },
84 { cascade_copy => 0, cascade_delete => 0 },
85 );
86
87
88 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-13 16:46:39
89 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pPJdUbHgHvUo4FxblDaJ2g
90
91
92 # You can replace this text with custom code or comments, and it will be preserved on regeneration
93 __PACKAGE__->meta->make_immutable;
94 1;
This page took 0.034925 seconds and 4 git commands to generate.