# NEVER EDIT this file. It was generated and will be overwritten without # notice upon regeneration of this application. You have been warned. package Bigtop::Example::Billing::Model::invoice; use strict; use warnings; __PACKAGE__->load_components( qw/ PK::Auto Core / ); __PACKAGE__->table( 'invoice' ); __PACKAGE__->add_columns( qw/ id number status sent paid my_company customer notes description / ); __PACKAGE__->set_primary_key( 'id' ); __PACKAGE__->belongs_to( status => 'Bigtop::Example::Billing::Model::status' ); __PACKAGE__->belongs_to( my_company => 'Bigtop::Example::Billing::Model::my_company' ); __PACKAGE__->belongs_to( customer => 'Bigtop::Example::Billing::Model::customer' ); __PACKAGE__->base_model( 'Bigtop::Example::Billing::Model' ); sub get_foreign_display_fields { return [ qw( number ) ]; } sub get_foreign_tables { return qw( Bigtop::Example::Billing::Model::status Bigtop::Example::Billing::Model::my_company Bigtop::Example::Billing::Model::customer ); } sub foreign_display { my $self = shift; my $number = $self->number() || ''; return "$number"; } sub table_name { return 'invoice'; } 1; =head1 NAME Bigtop::Example::Billing::Model::GEN::invoice - model for invoice table (generated part) =head1 DESCRIPTION This model inherits from Gantry::Utils::DBIxClass. It was generated by Bigtop, and IS subject to regeneration. =head1 METHODS You may use all normal Gantry::Utils::DBIxClass methods and the ones listed here: =over 4 =item get_foreign_display_fields =item get_foreign_tables =item foreign_display =item table_name =back =cut