]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Schema/Result/Account.pm
add comet support for real-time chatting
[chaz/chatty] / lib / Chatty / Schema / Result / Account.pm
1 use utf8;
2 package Chatty::Schema::Result::Account;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Chatty::Schema::Result::Account
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use Moose;
17 use MooseX::NonMoose;
18 use MooseX::MarkAsMethods autoclean => 1;
19 extends 'DBIx::Class::Core';
20
21 =head1 COMPONENTS LOADED
22
23 =over 4
24
25 =item * L<DBIx::Class::InflateColumn::DateTime>
26
27 =back
28
29 =cut
30
31 __PACKAGE__->load_components("InflateColumn::DateTime");
32
33 =head1 TABLE: C<account>
34
35 =cut
36
37 __PACKAGE__->table("account");
38
39 =head1 ACCESSORS
40
41 =head2 id
42
43 data_type: 'integer'
44 is_auto_increment: 1
45 is_nullable: 0
46
47 =head2 username
48
49 data_type: 'text'
50 is_nullable: 1
51
52 =head2 password
53
54 data_type: 'text'
55 is_nullable: 0
56
57 =head2 status
58
59 data_type: 'text'
60 default_value: 'active'
61 is_nullable: 1
62
63 =head2 current_room
64
65 data_type: 'integer'
66 is_foreign_key: 1
67 is_nullable: 1
68
69 =cut
70
71 __PACKAGE__->add_columns(
72 "id",
73 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
74 "username",
75 { data_type => "text", is_nullable => 1 },
76 "password",
77 { data_type => "text", is_nullable => 0 },
78 "status",
79 { data_type => "text", default_value => "active", is_nullable => 1 },
80 "current_room",
81 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
82 );
83
84 =head1 PRIMARY KEY
85
86 =over 4
87
88 =item * L</id>
89
90 =back
91
92 =cut
93
94 __PACKAGE__->set_primary_key("id");
95
96 =head1 UNIQUE CONSTRAINTS
97
98 =head2 C<username_unique>
99
100 =over 4
101
102 =item * L</username>
103
104 =back
105
106 =cut
107
108 __PACKAGE__->add_unique_constraint("username_unique", ["username"]);
109
110 =head1 RELATIONS
111
112 =head2 current_room
113
114 Type: belongs_to
115
116 Related object: L<Chatty::Schema::Result::Room>
117
118 =cut
119
120 __PACKAGE__->belongs_to(
121 "current_room",
122 "Chatty::Schema::Result::Room",
123 { id => "current_room" },
124 {
125 is_deferrable => 1,
126 join_type => "LEFT",
127 on_delete => "CASCADE",
128 on_update => "CASCADE",
129 },
130 );
131
132
133 # Created by DBIx::Class::Schema::Loader v0.07015 @ 2012-01-03 16:58:35
134 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vESFaWXuN0WYXW2Y18BfRg
135
136
137 # You can replace this text with custom code or comments, and it will be preserved on regeneration
138 __PACKAGE__->meta->make_immutable;
139 1;
This page took 0.034377 seconds and 4 git commands to generate.