add curries where applicable
[dbsrgits/SQL-Translator-2.0-ish.git] / lib / SQL / Translator / Object / Constraint.pm
CommitLineData
c5051351 1package SQL::Translator::Object::Constraint;
2use Moose;
109263d0 3use MooseX::Types::Moose qw(HashRef Str);
e157d782 4use MooseX::AttributeHelpers;
c0e05758 5use SQL::Translator::Types qw(Column);
cc73c25e 6extends 'SQL::Translator::Object';
c5051351 7
109263d0 8has 'name' => (
9 is => 'rw',
10 isa => Str,
11 required => 1
12);
13
14has 'columns' => (
e157d782 15 metaclass => 'Collection::Hash',
109263d0 16 is => 'rw',
17 isa => HashRef[Column],
e157d782 18 provides => {
19 exists => 'exists_column',
20 keys => 'column_ids',
21 get => 'get_column',
22 set => 'set_column',
23 },
109263d0 24 required => 1
25);
26
27has 'type' => (
28 is => 'rw',
29 isa => Str,
30 required => 1
31);
c5051351 32
7aa485df 33no Moose;
34__PACKAGE__->meta->make_immutable;
35
c5051351 361;