| 1 | package Daje::Database::Model::Super::UsersVerificationCodes; | ||
| 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::UsersVerificationCodes - Daje db model | ||
| 9 | # | ||
| 10 | # SYNOPSIS | ||
| 11 | # ======== | ||
| 12 | # | ||
| 13 | # | ||
| 14 | # use Daje::Database::Model::Super::UsersVerificationCodes; | ||
| 15 | # | ||
| 16 | # my $table = Daje::Database::Model::Super::UsersVerificationCodes->new(db => $db); | ||
| 17 | # | ||
| 18 | # my $result = $table->load_users_verification_codes_pkey($self, $users_verification_codes_pkey); | ||
| 19 | # | ||
| 20 | # my $result = $table->load_users_users_fkey($self, $users_users_fkey); | ||
| 21 | ## | ||
| 22 | # my $result = $table->insert($self, $data); | ||
| 23 | # | ||
| 24 | # $table->update($self, $data) ; | ||
| 25 | # | ||
| 26 | # | ||
| 27 | # DESCRIPTION | ||
| 28 | # =========== | ||
| 29 | # | ||
| 30 | # Daje::Database::Model::Super::UsersVerificationCodes is a Model super class | ||
| 31 | # | ||
| 32 | # METHODS | ||
| 33 | # ======= | ||
| 34 | # | ||
| 35 | # | ||
| 36 | # LICENSE | ||
| 37 | # ======= | ||
| 38 | # | ||
| 39 | # Copyright (C) janeskil1525. | ||
| 40 | # | ||
| 41 | # This library is free software; you can redistribute it and/or modify | ||
| 42 | # it under the same terms as Perl itself. | ||
| 43 | # | ||
| 44 | # AUTHOR | ||
| 45 | # ====== | ||
| 46 | # | ||
| 47 | # janeskil1525 E<lt>janeskil1525@gmail.com | ||
| 48 | # | ||
| 49 | |||
| 50 | # This file is generated automatically by Daje Tools 2026-04-01 11:11:57. | ||
| 51 | # It will be re-created by Daje Tools again and any changes | ||
| 52 | # will be over written. | ||
| 53 | # | ||
| 54 | # <!-- Autogenerated file 2026-04-01 11:11:57 --> | ||
| 55 | |||
| 56 | our $VERSION = '0.01'; | ||
| 57 | |||
| 58 | has 'fields' => '"users_verification_codes_pkey", "editnum", "insby", "insdatetime", "modby", "moddatetime","verification_code", | ||
| 59 | "users_users_fkey"'; | ||
| 60 | has 'primary_key_name' => "users_verification_codes_pkey"; | ||
| 61 | has 'table_name' => "users_verification_codes"; # | ||
| 62 | has 'mandatory' => 'verification_code,users_users_fkey,'; | ||
| 63 | has 'workflow' => ''; | ||
| 64 | |||
| 65 | async sub load_users_users_fkey_p($self, $users_users_fkey) { | ||
| 66 | return $self->load_users_users_fkey($users_users_fkey); | ||
| 67 | } | ||
| 68 | |||
| 69 | sub load_users_users_fkey($self, $users_users_fkey) { | ||
| 70 | return $self->load_fkey( | ||
| 71 | $self->table_name, $self->fields(), "users_users_fkey", $users_users_fkey | ||
| 72 | ); | ||
| 73 | } | ||
| 74 | async sub load_users_verification_codes_pkey_p($self, $users_verification_codes_pkey) { | ||
| 75 | return $self->load_users_verification_codes_pkey($users_verification_codes_pkey); | ||
| 76 | } | ||
| 77 | |||
| 78 | sub load_users_verification_codes_pkey($self, $users_verification_codes_pkey) { | ||
| 79 | return $self->load_pk( | ||
| 80 | $self->table_name, $self->fields(), $self->primary_key_name(), $users_verification_codes_pkey | ||
| 81 | ); | ||
| 82 | } | ||
| 83 | |||
| 84 | sub insert($self, $data) { | ||
| 85 | my $result = $self->SUPER::insert( | ||
| 86 | $self->table_name, $data, $self->primary_key_name | ||
| 87 | ); | ||
| 88 | return $result; | ||
| 89 | } | ||
| 90 | |||
| 91 | sub update($self, $data) { | ||
| 92 | return $self->SUPER::update | ||
| 93 | ( | ||
| 94 | $self->table_name, $data, | ||
| 95 | { | ||
| 96 | $self->primary_key_name() => $data->{$self->primary_key_name()} | ||
| 97 | } | ||
| 98 | ); | ||
| 99 | } | ||
| 100 | |||
| 101 | sub delete($self, $primary_key) { | ||
| 102 | return $self->SUPER::delete($self->table_name, { $self->primary_key_name() => $primary_key}); | ||
| 103 | } | ||
| 104 | 1; | ||
| 105 |