]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Schema/Result/Room.pm
add comet support for real-time chatting
[chaz/chatty] / lib / Chatty / Schema / Result / Room.pm
1 use utf8;
2 package Chatty::Schema::Result::Room;
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::Room
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<room>
34
35 =cut
36
37 __PACKAGE__->table("room");
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 name
48
49 data_type: 'text'
50 is_nullable: 1
51
52 =head2 created
53
54 data_type: 'timestamp'
55 default_value: current_timestamp
56 is_nullable: 1
57
58 =cut
59
60 __PACKAGE__->add_columns(
61 "id",
62 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
63 "name",
64 { data_type => "text", is_nullable => 1 },
65 "created",
66 {
67 data_type => "timestamp",
68 default_value => \"current_timestamp",
69 is_nullable => 1,
70 },
71 );
72
73 =head1 PRIMARY KEY
74
75 =over 4
76
77 =item * L</id>
78
79 =back
80
81 =cut
82
83 __PACKAGE__->set_primary_key("id");
84
85 =head1 UNIQUE CONSTRAINTS
86
87 =head2 C<name_unique>
88
89 =over 4
90
91 =item * L</name>
92
93 =back
94
95 =cut
96
97 __PACKAGE__->add_unique_constraint("name_unique", ["name"]);
98
99 =head1 RELATIONS
100
101 =head2 accounts
102
103 Type: has_many
104
105 Related object: L<Chatty::Schema::Result::Account>
106
107 =cut
108
109 __PACKAGE__->has_many(
110 "accounts",
111 "Chatty::Schema::Result::Account",
112 { "foreign.current_room" => "self.id" },
113 { cascade_copy => 0, cascade_delete => 0 },
114 );
115
116
117 # Created by DBIx::Class::Schema::Loader v0.07015 @ 2012-01-03 16:46:51
118 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:36bNroQtVWZPWUMc+6yAQw
119
120
121 # You can replace this text with custom code or comments, and it will be preserved on regeneration
122 __PACKAGE__->meta->make_immutable;
123 1;
This page took 0.038219 seconds and 4 git commands to generate.