« Database/Model/Super/AuthoritiesFunction.pm
↑ Summary
Database/Model/Super/AuthoritiesFunctionPluginRole.pm »
| 1 | package Daje::Database::Model::Super::AuthoritiesFunctionPermissions; | ||
| 2 | use Mojo::Base 'Daje::Database::Model::Super::Common::Base', -base, -signatures, -async_await; | ||
| 3 | use v5.42; | ||
| 4 | |||
| 5 | # NAME | ||
| 6 | # ==== | ||
| 7 | # | ||
| 8 | # Daje::Database::Model::Super::AuthoritiesFunctionPermissions - Daje db model | ||
| 9 | # | ||
| 10 | # SYNOPSIS | ||
| 11 | # ======== | ||
| 12 | # | ||
| 13 | # | ||
| 14 | # use Daje::Database::Model::Super::AuthoritiesFunctionPermissions; | ||
| 15 | # | ||
| 16 | # my $table = Daje::Database::Model::Super::AuthoritiesFunctionPermissions->new(db => $db); | ||
| 17 | # | ||
| 18 | # my $result = $table->load_authorities_function_permissions_pkey($self, $authorities_function_permissions_pkey); | ||
| 19 | # | ||
| 20 | # my $result = $table->load_authorities_function_fkey($self, $authorities_function_fkey); | ||
| 21 | # | ||
| 22 | # my $result = $table->load_authorities_permissions_fkey($self, $authorities_permissions_fkey); | ||
| 23 | ## | ||
| 24 | # my $result = $table->insert($self, $data); | ||
| 25 | # | ||
| 26 | # $table->update($self, $data) ; | ||
| 27 | # | ||
| 28 | # | ||
| 29 | # DESCRIPTION | ||
| 30 | # =========== | ||
| 31 | # | ||
| 32 | # Daje::Database::Model::Super::AuthoritiesFunctionPermissions is a Model super class | ||
| 33 | # | ||
| 34 | # METHODS | ||
| 35 | # ======= | ||
| 36 | # | ||
| 37 | # | ||
| 38 | # LICENSE | ||
| 39 | # ======= | ||
| 40 | # | ||
| 41 | # Copyright (C) janeskil1525. | ||
| 42 | # | ||
| 43 | # This library is free software; you can redistribute it and/or modify | ||
| 44 | # it under the same terms as Perl itself. | ||
| 45 | # | ||
| 46 | # AUTHOR | ||
| 47 | # ====== | ||
| 48 | # | ||
| 49 | # janeskil1525 E<lt>janeskil1525@gmail.com | ||
| 50 | # | ||
| 51 | |||
| 52 | # This file is generated automatically by Daje Tools 2026-03-01 05:33:52. | ||
| 53 | # It will be re-created by Daje Tools again and any changes | ||
| 54 | # will be over written. | ||
| 55 | # | ||
| 56 | # <!-- Autogenerated file 2026-03-01 05:33:52 --> | ||
| 57 | |||
| 58 | our $VERSION = '0.01'; | ||
| 59 | |||
| 60 | has 'fields' => '"authorities_function_permissions_pkey", "editnum", "insby", "insdatetime", "modby", "moddatetime", | ||
| 61 | "authorities_function_fkey", | ||
| 62 | "authorities_permissions_fkey"'; | ||
| 63 | has 'primary_key_name' => "authorities_function_permissions_pkey"; | ||
| 64 | has 'table_name' => "authorities_function_permissions"; # | ||
| 65 | has 'mandatory' => 'authorities_function_fkey,authorities_permissions_fkey,'; | ||
| 66 | has 'workflow' => ''; | ||
| 67 | |||
| 68 | async sub load_authorities_function_fkey_p($self, $authorities_function_fkey) { | ||
| 69 | return $self->load_authorities_function_fkey($authorities_function_fkey); | ||
| 70 | } | ||
| 71 | |||
| 72 | sub load_authorities_function_fkey($self, $authorities_function_fkey) { | ||
| 73 | return $self->load_fkey( | ||
| 74 | $self->table_name, $self->fields(), "authorities_function_fkey", $authorities_function_fkey | ||
| 75 | ); | ||
| 76 | } | ||
| 77 | async sub load_authorities_permissions_fkey_p($self, $authorities_permissions_fkey) { | ||
| 78 | return $self->load_authorities_permissions_fkey($authorities_permissions_fkey); | ||
| 79 | } | ||
| 80 | |||
| 81 | sub load_authorities_permissions_fkey($self, $authorities_permissions_fkey) { | ||
| 82 | return $self->load_fkey( | ||
| 83 | $self->table_name, $self->fields(), "authorities_permissions_fkey", $authorities_permissions_fkey | ||
| 84 | ); | ||
| 85 | } | ||
| 86 | async sub load_authorities_function_permissions_pkey_p($self, $authorities_function_permissions_pkey) { | ||
| 87 | return $self->load_authorities_function_permissions_pkey($authorities_function_permissions_pkey); | ||
| 88 | } | ||
| 89 | |||
| 90 | sub load_authorities_function_permissions_pkey($self, $authorities_function_permissions_pkey) { | ||
| 91 | return $self->load_pk( | ||
| 92 | $self->table_name, $self->fields(), $self->primary_key_name(), $authorities_function_permissions_pkey | ||
| 93 | ); | ||
| 94 | } | ||
| 95 | |||
| 96 | sub insert($self, $data) { | ||
| 97 | my $result = $self->SUPER::insert( | ||
| 98 | $self->table_name, $data, $self->primary_key_name | ||
| 99 | ); | ||
| 100 | return $result; | ||
| 101 | } | ||
| 102 | |||
| 103 | sub update($self, $data) { | ||
| 104 | return $self->SUPER::update | ||
| 105 | ( | ||
| 106 | $self->table_name, $data, | ||
| 107 | { | ||
| 108 | $self->primary_key_name() => $data->{$self->primary_key_name()} | ||
| 109 | } | ||
| 110 | ); | ||
| 111 | } | ||
| 112 | |||
| 113 | sub delete($self, $primary_key) { | ||
| 114 | return $self->SUPER::delete($self->table_name, { $self->primary_key_name() => $primary_key}); | ||
| 115 | } | ||
| 116 | 1; | ||
| 117 |