Test::DBIx::Class::Example::Schema::Result::Job - A Job


Test-DBIx-Class documentation Contained in the Test-DBIx-Class distribution.

Index


Code Index:

NAME

Top

Test::DBIx::Class::Example::Schema::Result::Job - A Job

DESCRIPTION

Top

A job is something you gotta do.

SEE ALSO

Top

The following modules or resources may be of interest.

DBIx::Class

AUTHOR

Top

John Napiorkowski <jjnapiork@cpan.org>

COPYRIGHT & LICENSE

Top


Test-DBIx-Class documentation Contained in the Test-DBIx-Class distribution.

package Test::DBIx::Class::Example::Schema::Result::Job; {
	use base 'Test::DBIx::Class::Example::Schema::Result';

	__PACKAGE__->table('job');

	__PACKAGE__->add_columns(
 		job_id => {
			data_type => 'varchar', 
			size => '36', 
			is_nullable => 0, 
		},
		name => {
			data_type => 'varchar',
			size => '20',
			is_nullable => 0,
		},
		description => {
			data_type => 'varchar',
			size => '100',
			is_nullable => 0,
		},
	);

	__PACKAGE__->set_primary_key('job_id');
	__PACKAGE__->uuid_columns('job_id');

	__PACKAGE__->has_many(
		company_employee_rs => 'Test::DBIx::Class::Example::Schema::Result::Company::Employee',
		{ 'foreign.fk_job_id' => 'self.job_id'}
	);

	__PACKAGE__->many_to_many(
		companies => 'company_job_rs', 'company',
	);

	__PACKAGE__->many_to_many(
		employees => 'company_job_rs', 'employee',
	);

} 1

__END__