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