« lib/Rapi/Blog/Template/Postprocessor/TextMarkdown.pm
↑ Summary
lib/Rapi/Blog/PreAuth/Actor/Login.pm »
| 1 | use utf8; | ||
| 2 | package Rapi::Blog::DB::Result::PreauthActionEvent; | ||
| 3 | |||
| 4 | # Created by DBIx::Class::Schema::Loader | ||
| 5 | # DO NOT MODIFY THE FIRST PART OF THIS FILE | ||
| 6 | |||
| 7 | use strict; | ||
| 8 | use warnings; | ||
| 9 | |||
| 10 | use Moose; | ||
| 11 | use MooseX::NonMoose; | ||
| 12 | use MooseX::MarkAsMethods autoclean => 1; | ||
| 13 | extends 'DBIx::Class::Core'; | ||
| 14 | __PACKAGE__->load_components("InflateColumn::DateTime"); | ||
| 15 | __PACKAGE__->table("preauth_action_event"); | ||
| 16 | __PACKAGE__->add_columns( | ||
| 17 | "id", | ||
| 18 | { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, | ||
| 19 | "ts", | ||
| 20 | { data_type => "datetime", is_nullable => 0 }, | ||
| 21 | "type_id", | ||
| 22 | { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, | ||
| 23 | "action_id", | ||
| 24 | { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, | ||
| 25 | "hit_id", | ||
| 26 | { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, | ||
| 27 | "info", | ||
| 28 | { data_type => "text", is_nullable => 1 }, | ||
| 29 | ); | ||
| 30 | __PACKAGE__->set_primary_key("id"); | ||
| 31 | __PACKAGE__->belongs_to( | ||
| 32 | "action", | ||
| 33 | "Rapi::Blog::DB::Result::PreauthAction", | ||
| 34 | { id => "action_id" }, | ||
| 35 | { is_deferrable => 0, on_delete => "RESTRICT", on_update => "CASCADE" }, | ||
| 36 | ); | ||
| 37 | __PACKAGE__->belongs_to( | ||
| 38 | "hit", | ||
| 39 | "Rapi::Blog::DB::Result::Hit", | ||
| 40 | { id => "hit_id" }, | ||
| 41 | { | ||
| 42 | is_deferrable => 0, | ||
| 43 | join_type => "LEFT", | ||
| 44 | on_delete => "RESTRICT", | ||
| 45 | on_update => "CASCADE", | ||
| 46 | }, | ||
| 47 | ); | ||
| 48 | __PACKAGE__->belongs_to( | ||
| 49 | "type", | ||
| 50 | "Rapi::Blog::DB::Result::PreauthEventType", | ||
| 51 | { id => "type_id" }, | ||
| 52 | { is_deferrable => 0, on_delete => "RESTRICT", on_update => "CASCADE" }, | ||
| 53 | ); | ||
| 54 | |||
| 55 | |||
| 56 | # Created by DBIx::Class::Schema::Loader v0.07049 @ 2018-10-28 02:04:56 | ||
| 57 | # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CTXzUj/Ria83CXwXwZqAfQ | ||
| 58 | |||
| 59 | |||
| 60 | sub insert { | ||
| 61 | my ($self, $columns) = @_; | ||
| 62 | $self->set_inflated_columns($columns) if $columns; | ||
| 63 | |||
| 64 | $self->ts or $self->ts( Rapi::Blog::Util->now_ts ); | ||
| 65 | |||
| 66 | $self->next::method; | ||
| 67 | |||
| 68 | return $self; | ||
| 69 | } | ||
| 70 | |||
| 71 | # You can replace this text with custom code or comments, and it will be preserved on regeneration | ||
| 72 | __PACKAGE__->meta->make_immutable; | ||
| 73 | 1; |