Skip to content
Snippets Groups Projects
Commit 4c212f41 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

import generated code

parent 02c977ac
No related branches found
No related tags found
No related merge requests found
package IdPAccountManager::DB;
use strict;
use base 'Rose::DB';
__PACKAGE__->use_private_registry;
__PACKAGE__->register_db
(
connect_options => { AutoCommit => 1, ChopBlanks => 1 },
driver => 'mysql',
dsn => 'dbi:mysql:dbname=idp_account_manager;host=localhost',
password => 'root',
username => 'root',
);
1;
package IdPAccountManager::DB::Object;
use base 'Rose::DB::Object';
use IdPAccountManager::DB;
sub init_db {
IdPAccountManager::DB->new();
}
1;
package IdPAccountManager::Data::Authenticationtoken;
use strict;
use base 'IdPAccountManager::DB::Object';
__PACKAGE__->meta->setup(
table => 'authenticationtokens',
columns => [
id => { type => 'bigserial', not_null => 1 },
token => { type => 'varchar', length => 50, not_null => 1 },
email_address => { type => 'varchar', length => 200, not_null => 1 },
sp_entityid => { type => 'varchar', length => 200, not_null => 1 },
creation_date => { type => 'integer' },
],
primary_key_columns => [ 'id' ],
unique_keys => [
[ 'token' ],
[ 'email_address', 'sp_entityid' ],
],
);
1;
package IdPAccountManager::Data::Authenticationtoken::Manager;
use strict;
use base qw(Rose::DB::Object::Manager);
use IdPAccountManager::Data::Authenticationtoken;
sub object_class { 'IdPAccountManager::Data::Authenticationtoken' }
__PACKAGE__->make_manager_methods('authenticationtokens');
1;
package IdPAccountManager::Data::Serviceprovider;
use strict;
use base 'IdPAccountManager::DB::Object';
__PACKAGE__->meta->setup(
table => 'serviceproviders',
columns => [
id => { type => 'bigserial', not_null => 1 },
entityid => { type => 'varchar', length => 200, not_null => 1 },
displayname => { type => 'varchar', length => 500 },
contacts => { type => 'varchar', length => 2000 },
],
primary_key_columns => [ 'id' ],
unique_key => [ 'entityid' ],
);
1;
package IdPAccountManager::Data::Serviceprovider::Manager;
use strict;
use base qw(Rose::DB::Object::Manager);
use IdPAccountManager::Data::Serviceprovider;
sub object_class { 'IdPAccountManager::Data::Serviceprovider' }
__PACKAGE__->make_manager_methods('serviceproviders');
1;
......@@ -2,22 +2,21 @@ package IdPAccountManager::Data::Testaccount;
use strict;
use base qw(IdPAccountManager::Data::DB::Object::AutoBase2);
use base 'IdPAccountManager::DB::Object';
__PACKAGE__->meta->setup(
table => 'testaccounts',
table => 'testaccounts',
columns => [
id => { type => 'bigserial', not_null => 1 },
user_password_hash =>
{ type => 'varchar', length => 50, not_null => 1 },
creation_date => { type => 'integer' },
expiration_date => { type => 'integer' },
account_profile => { type => 'varchar', length => 100, not_null => 1 },
sp_entityid => { type => 'varchar', length => 250, not_null => 1 },
id => { type => 'bigserial', not_null => 1 },
user_password_hash => { type => 'varchar', length => 50, not_null => 1 },
creation_date => { type => 'integer' },
expiration_date => { type => 'integer' },
account_profile => { type => 'varchar', length => 100, not_null => 1 },
sp_entityid => { type => 'varchar', length => 250, not_null => 1 },
],
primary_key_columns => ['id'],
primary_key_columns => [ 'id' ],
);
1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment