]> iEval git - gruntmaster-data.git/blobdiff - lib/Gruntmaster/Data/Result/User.pm
Add a field for user creation time
[gruntmaster-data.git] / lib / Gruntmaster / Data / Result / User.pm
index c5547c1f776c3b179e54f292600ce7edf26289ad..f961af915c18a8c6ea47b64c050e826663a9bb4c 100644 (file)
@@ -6,7 +6,7 @@ package Gruntmaster::Data::Result::User;
 
 =head1 NAME
 
-Gruntmaster::Data::Result::User
+Gruntmaster::Data::Result::User - List of users
 
 =cut
 
@@ -33,6 +33,8 @@ __PACKAGE__->table("users");
   data_type: 'text'
   is_nullable: 1
 
+RFC2307-encoded passphrase
+
 =head2 admin
 
   data_type: 'boolean'
@@ -44,6 +46,8 @@ __PACKAGE__->table("users");
   data_type: 'text'
   is_nullable: 1
 
+Full name of user
+
 =head2 email
 
   data_type: 'text'
@@ -69,11 +73,28 @@ __PACKAGE__->table("users");
   data_type: 'text'
   is_nullable: 1
 
+Highschool, Undergraduate, Master, Doctorate or Other
+
+=head2 country
+
+  data_type: 'text'
+  is_nullable: 1
+
 =head2 lastjob
 
   data_type: 'bigint'
   is_nullable: 1
 
+Unix time when this user last submitted a job
+
+=head2 since
+
+  data_type: 'bigint'
+  default_value: (date_part('epoch'::text, now()))::bigint
+  is_nullable: 1
+
+Unix time when this user was created
+
 =cut
 
 __PACKAGE__->add_columns(
@@ -95,8 +116,16 @@ __PACKAGE__->add_columns(
   { data_type => "text", is_nullable => 1 },
   "level",
   { data_type => "text", is_nullable => 1 },
+  "country",
+  { data_type => "text", is_nullable => 1 },
   "lastjob",
   { data_type => "bigint", is_nullable => 1 },
+  "since",
+  {
+    data_type     => "bigint",
+    default_value => \"(date_part('epoch'::text, now()))::bigint",
+    is_nullable   => 1,
+  },
 );
 
 =head1 PRIMARY KEY
@@ -204,8 +233,16 @@ __PACKAGE__->has_many(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JcVHC/n8J+NgJge9LkckYA
+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-02-10 18:42:04
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L/ExLdA0pkJ1DeM+RzlDjw
+
+use Class::Method::Modifiers qw/after/;
+
+after qw/insert update delete/ => sub {
+       my ($self) = @_;
+       Gruntmaster::Data::purge '/us/';
+       Gruntmaster::Data::purge '/us/' . $self->id;
+};
 
 use Authen::Passphrase;
 use Authen::Passphrase::BlowfishCrypt;
This page took 0.026916 seconds and 4 git commands to generate.