File: Product.pm

package info (click to toggle)
librose-db-object-perl 1%3A0.815-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,048 kB
  • sloc: perl: 79,670; sql: 28; makefile: 7
file content (12 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
package My::Product;
use strict;
use base 'My::Object';
__PACKAGE__->meta->columns(qw(id name vendor_id));
__PACKAGE__->meta->foreign_keys(qw(vendor));
__PACKAGE__->meta->relationships
(
  prices => { type => 'one to many' },
  colors => { type => 'many to many' },
);
__PACKAGE__->meta->initialize;
1;