]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Schema/Result/Room.pm
fixed sqlite schema timestamp identifier
[chaz/chatty] / lib / Chatty / Schema / Result / Room.pm
1 package Chatty::Schema::Result::Room;
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::Room
19
20 =cut
21
22 __PACKAGE__->table("room");
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 name
33
34 data_type: 'text'
35 is_nullable: 1
36
37 =head2 created
38
39 data_type: 'timestamp'
40 default_value: current_timestamp
41 is_nullable: 1
42
43 =cut
44
45 __PACKAGE__->add_columns(
46 "id",
47 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
48 "name",
49 { data_type => "text", is_nullable => 1 },
50 "created",
51 {
52 data_type => "timestamp",
53 default_value => \"current_timestamp",
54 is_nullable => 1,
55 },
56 );
57 __PACKAGE__->set_primary_key("id");
58 __PACKAGE__->add_unique_constraint("name_unique", ["name"]);
59
60 =head1 RELATIONS
61
62 =head2 accounts
63
64 Type: has_many
65
66 Related object: L<Chatty::Schema::Result::Account>
67
68 =cut
69
70 __PACKAGE__->has_many(
71 "accounts",
72 "Chatty::Schema::Result::Account",
73 { "foreign.current_room" => "self.id" },
74 { cascade_copy => 0, cascade_delete => 0 },
75 );
76
77 =head2 messages
78
79 Type: has_many
80
81 Related object: L<Chatty::Schema::Result::Message>
82
83 =cut
84
85 __PACKAGE__->has_many(
86 "messages",
87 "Chatty::Schema::Result::Message",
88 { "foreign.room" => "self.id" },
89 { cascade_copy => 0, cascade_delete => 0 },
90 );
91
92
93 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-17 20:21:50
94 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U0zHyxd2zFVEnATmgpd+Ag
95
96
97 # You can replace this text with custom code or comments, and it will be preserved on regeneration
98 __PACKAGE__->meta->make_immutable;
99 1;
This page took 0.036788 seconds and 4 git commands to generate.