File: Coin.pm

package info (click to toggle)
libur-perl 0.470%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,192 kB
  • sloc: perl: 61,814; javascript: 255; xml: 108; sh: 13; makefile: 9
file content (28 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package Vending::Coin;

use strict;
use warnings;

use Vending;
class Vending::Coin {
    table_name => 'COIN',
    is => 'Vending::Content',
    id_by => [
        coin_id => { is => 'integer' },
    ],
    has => [
        name         => { via => 'item_type', to => 'name' },
        value_cents  => { via => 'coin_type', to => 'value_cents' },
        coin_type    => { is => 'Vending::CoinType', id_by => 'name' },
        item_type      => { is => 'Vending::ContentType', id_by => 'type_id', constraint_name => 'COIN_TYPE_ID_CONTENT_TYPE_TYPE_ID_FK' },
    ],
    schema_name => 'Machine',
    data_source => 'Vending::DataSource::Machine',
};

sub subtype_name_resolver {
    return __PACKAGE__;
}


1;