Revision 729
- Date:
- 2018/10/22 10:41:26
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/webshop/lib/webshop/SQL/AddressTable.pm
24 24 _s_filter 25 25 26 26 _uid_filter 27 _delivery_id_filter 27 28 _active_delivery_filter 28 29 )]; 29 30 … … 51 52 my @parent_properties = grep { $_->{attr} ne 'sections' } $self->SUPER::required_properties; 52 53 return ( 53 54 @parent_properties, 54 { # User ID 55 { 55 56 'attr' => 'uid', 56 57 'type' => 'string', 57 58 'rusname' => 'ID пользователя', 58 # 'hidden' => 1, 59 59 'db_field' => 'uid', 60 60 'db_type' => 'integer', 61 61 'db_opts' => "not null default 0", 62 62 'default' => 0, 63 63 }, 64 64 { 65 'attr' => 'delivery_id', 66 'type' => 'lookup', 67 'rusname' => 'Доставка', 68 'lookup_opts' => { 69 'class' => 'webshop::Delivery', 70 }, 71 'db_field' => 'delivery_id', 72 'db_type' => 'integer', 73 'db_opts' => "not null default 0", 74 }, 75 { 65 76 'attr' => 'sections', 66 77 'type' => 'sections_list', 67 78 'rusname' => 'Секции', … … 79 90 return &SQL::Common::_generic_int_filter('d.uid', $opts{uid}); 80 91 } 81 92 93 sub _delivery_id_filter { 94 my ($self,%opts)=@_; 95 return undef unless ( exists $opts{delivery_id} ); 96 return &SQL::Common::_generic_int_filter('d.delivery_id', $opts{delivery_id}); 97 } 98 82 99 sub _s_filter { 83 100 my ($self,%opts)=@_; 84 101 return undef unless ( exists $opts{s} );