aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2010-12-23 14:09:00 +0100
committerStefan Kangas <stefankangas@gmail.com>2010-12-23 14:09:00 +0100
commite934ce293d5a8ee20751058e901586ecf374e949 (patch)
tree96c7276bd3d4e14ed9275d9bc7100f9c22b4d199 /lib/Fripost
parent08f6cac592c21d4871a631252187953651dcebc0 (diff)
Add fripost-adduser.pl
Diffstat (limited to 'lib/Fripost')
-rwxr-xr-xlib/Fripost/Schema.pm36
-rw-r--r--lib/Fripost/Schema/Result/Mailbox.pm54
2 files changed, 90 insertions, 0 deletions
diff --git a/lib/Fripost/Schema.pm b/lib/Fripost/Schema.pm
new file mode 100755
index 0000000..5e171e2
--- /dev/null
+++ b/lib/Fripost/Schema.pm
@@ -0,0 +1,36 @@
+package Fripost::Schema;
+
+use 5.010_000;
+use warnings;
+use strict;
+
+use base qw/DBIx::Class::Schema/;
+our $VERSION = '0.01';
+
+ __PACKAGE__->load_namespaces();
+
+1;
+
+=head1 NAME
+
+Fripost::Schema -
+
+=head1 AUTHOR
+
+Stefan Kangas C<< <skangas at skangas.se> >>
+
+=head1 COPYRIGHT
+
+Copyright 2010 Stefan Kangas, all rights reserved.
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as perl itself.
+
+=cut
+
+1; # End of Schema.pm
+
+__END__
+
diff --git a/lib/Fripost/Schema/Result/Mailbox.pm b/lib/Fripost/Schema/Result/Mailbox.pm
new file mode 100644
index 0000000..577c350
--- /dev/null
+++ b/lib/Fripost/Schema/Result/Mailbox.pm
@@ -0,0 +1,54 @@
+package Fripost::Schema::Result::Mailbox;
+
+use 5.010_000;
+use warnings;
+use strict;
+
+use base qw/DBIx::Class::Core/;
+
+# mysql> describe mailbox;
+# +-------------+--------------+------+-----+---------------------+-------+
+# | Field | Type | Null | Key | Default | Extra |
+# +-------------+--------------+------+-----+---------------------+-------+
+# | username | varchar(255) | NO | PRI | | |
+# | password | varchar(255) | NO | | | |
+# | name | varchar(255) | NO | | | |
+# | maildir | varchar(255) | NO | | | |
+# | domain | varchar(255) | NO | | | |
+# | create_date | datetime | NO | | 0000-00-00 00:00:00 | |
+# | change_date | datetime | NO | | 0000-00-00 00:00:00 | |
+# | active | tinyint(4) | NO | | 1 | |
+# +-------------+--------------+------+-----+---------------------+-------+
+# 8 rows in set (0.00 sec)
+
+__PACKAGE__->load_components(qw/InflateColumn::DateTime/);
+
+__PACKAGE__->table('mailbox');
+__PACKAGE__->add_columns(qw/ username password name maildir domain active /);
+__PACKAGE__->add_columns(
+ create_date => { data_type => 'datetime', timezone => "Europe/Stockholm", locale => "se_SV" },
+ change_date => { data_type => 'datetime', timezone => "Europe/Stockholm", locale => "se_SV" }
+);
+
+__PACKAGE__->set_primary_key('username');
+
+=head1 NAME
+
+Fripost::Schema::Result::Mailbox -
+
+=head1 AUTHOR
+
+Stefan Kangas C<< <skangas at skangas.se> >>
+
+=head1 COPYRIGHT
+
+Copyright 2010 Stefan Kangas, all rights reserved.
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as perl itself.
+
+=cut
+
+1; # End of Mailbox.pm