fix docs
[bse.git] / site / cgi-bin / modules / BSE / TB / OrderItem.pm
CommitLineData
0ec4ac8a
TC
1package BSE::TB::OrderItem;
2use strict;
3# represents an order line item from the database
4use Squirrel::Row;
5use vars qw/@ISA/;
6@ISA = qw/Squirrel::Row/;
7
8sub columns {
9 return qw/id productId orderId units price wholesalePrice gst options
10 customInt1 customInt2 customInt3 customStr1 customStr2 customStr3
7b4490e1 11 title description subscription_id subscription_period max_lapsed
74b21f6d 12 session_id product_code/;
0ec4ac8a
TC
13}
14
14604ada
TC
15sub defaults {
16 return
17 (
18 units => 1,
19 options => '',
20 customInt1 => undef,
21 customInt2 => undef,
22 customInt3 => undef,
23 customStr1 => undef,
24 customStr2 => undef,
25 customStr3 => undef,
26 );
27}
28
58baa27b
TC
29sub option_list {
30 my ($self) = @_;
31
32 require BSE::TB::OrderItemOptions;
33 return sort { $a->{display_order} <=> $b->{display_order} }
34 BSE::TB::OrderItemOptions->getBy(order_item_id => $self->{id});
35}
36
0ec4ac8a 371;