]> Dogcows Code - chaz/chatty/blob - lib/Chatty/Schema/Result/Message.pm
fixed sqlite schema timestamp identifier
[chaz/chatty] / lib / Chatty / Schema / Result / Message.pm
1 package Chatty::Schema::Result::Message;
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::Message
19
20 =cut
21
22 __PACKAGE__->table("message");
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 posted
33
34 data_type: 'timestamp'
35 default_value: current_timestamp
36 is_nullable: 1
37
38 =head2 author
39
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
43
44 =head2 room
45
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
49
50 =head2 content
51
52 data_type: 'text'
53 is_nullable: 1
54
55 =cut
56
57 __PACKAGE__->add_columns(
58 "id",
59 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
60 "posted",
61 {
62 data_type => "timestamp",
63 default_value => \"current_timestamp",
64 is_nullable => 1,
65 },
66 "author",
67 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
68 "room",
69 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
70 "content",
71 { data_type => "text", is_nullable => 1 },
72 );
73 __PACKAGE__->set_primary_key("id");
74
75 =head1 RELATIONS
76
77 =head2 room
78
79 Type: belongs_to
80
81 Related object: L<Chatty::Schema::Result::Room>
82
83 =cut
84
85 __PACKAGE__->belongs_to(
86 "room",
87 "Chatty::Schema::Result::Room",
88 { id => "room" },
89 {
90 is_deferrable => 1,
91 join_type => "LEFT",
92 on_delete => "CASCADE",
93 on_update => "CASCADE",
94 },
95 );
96
97 =head2 author
98
99 Type: belongs_to
100
101 Related object: L<Chatty::Schema::Result::Account>
102
103 =cut
104
105 __PACKAGE__->belongs_to(
106 "author",
107 "Chatty::Schema::Result::Account",
108 { id => "author" },
109 {
110 is_deferrable => 1,
111 join_type => "LEFT",
112 on_delete => "CASCADE",
113 on_update => "CASCADE",
114 },
115 );
116
117
118 # Created by DBIx::Class::Schema::Loader v0.07010 @ 2011-10-17 20:21:50
119 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R28y3tHGM5FZTILUAO/0XA
120
121
122 # You can replace this text with custom code or comments, and it will be preserved on regeneration
123 __PACKAGE__->meta->make_immutable;
124 1;
This page took 0.037221 seconds and 4 git commands to generate.