Commit 69c31cf6d67805d95e3ae509787726ea93dd036e
1 parent
9e4daec8
Exists in
master
Implementa o encaminhamento para categoria
git-svn-id: http://svn.softwarepublico.gov.br/svn/sistemadeatendimento/sistema/trunk@21 63db2ce5-8a6c-0410-abb9-a418dd412890
Showing
1 changed file
with
83 additions
and
0 deletions
Show diff stats
Fila-Servico/lib/Fila/Servico/DB/CategoriaEncaminhamento.pm
0 → 100644
@@ -0,0 +1,83 @@ | @@ -0,0 +1,83 @@ | ||
1 | +package Fila::Servico::DB::CategoriaEncaminhamento; | ||
2 | +# Copyright 2008, 2009 - Oktiva Comércio e Serviços de Informática Ltda. | ||
3 | +# | ||
4 | +# Este arquivo é parte do programa FILA - Sistema de Atendimento | ||
5 | +# | ||
6 | +# O FILA é um software livre; você pode redistribui-lo e/ou modifica-lo | ||
7 | +# dentro dos termos da Licença Pública Geral GNU como publicada pela | ||
8 | +# Fundação do Software Livre (FSF); na versão 2 da Licença. | ||
9 | +# | ||
10 | +# Este programa é distribuido na esperança que possa ser util, mas SEM | ||
11 | +# NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | ||
12 | +# MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU | ||
13 | +# para maiores detalhes. | ||
14 | +# | ||
15 | +# Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o | ||
16 | +# título "LICENCA.txt", junto com este programa, se não, escreva para a | ||
17 | +# Fundação do Software Livre(FSF) Inc., 51 Franklin St, Fifth Floor, | ||
18 | + | ||
19 | +use base qw(DBIx::Class); | ||
20 | + | ||
21 | +__PACKAGE__->load_components(qw(InflateColumn::DateTime PK::Auto Core)); | ||
22 | +__PACKAGE__->table('categoria_encaminhamento'); | ||
23 | +__PACKAGE__->add_columns | ||
24 | + ( | ||
25 | + id_local => | ||
26 | + { | ||
27 | + data_type => 'integer' | ||
28 | + }, | ||
29 | + id_atendimento => | ||
30 | + { | ||
31 | + data_type => 'integer', | ||
32 | + }, | ||
33 | + id_categoria => | ||
34 | + { | ||
35 | + data_type => 'integer', | ||
36 | + }, | ||
37 | + id_guiche_origem => | ||
38 | + { | ||
39 | + data_type => 'integer', | ||
40 | + }, | ||
41 | + vt_ini => | ||
42 | + { | ||
43 | + data_type => 'timestamp with time zone', | ||
44 | + }, | ||
45 | + vt_fim => | ||
46 | + { | ||
47 | + data_type => 'timestamp with time zone', | ||
48 | + }, | ||
49 | + informacoes => | ||
50 | + { | ||
51 | + data_type => 'varchar', | ||
52 | + }, | ||
53 | + ); | ||
54 | +__PACKAGE__->set_primary_key(qw(id_atendimento id_categoria vt_ini vt_fim)); | ||
55 | +__PACKAGE__->belongs_to('atendimento', 'Fila::Servico::DB::Atendimento', | ||
56 | + { 'foreign.id_atendimento' => 'self.id_atendimento' }, | ||
57 | + { 'join_type' => 'left' }); | ||
58 | +__PACKAGE__->belongs_to('categoria', 'Fila::Servico::DB::Categoria', | ||
59 | + { 'foreign.id_categoria' => 'self.id_categoria' }, | ||
60 | + { 'join_type' => 'left' }); | ||
61 | +__PACKAGE__->belongs_to('guiche_origem', 'Fila::Servico::DB::Guiche', | ||
62 | + { 'foreign.id_guiche' => 'self.id_guiche_origem' }, | ||
63 | + { 'join_type' => 'left' }); | ||
64 | + | ||
65 | +1; | ||
66 | + | ||
67 | +__END__ | ||
68 | + | ||
69 | +=head1 NAME | ||
70 | + | ||
71 | +CategoriaEncaminhamento - Encaminhamentos para uma categoria | ||
72 | + | ||
73 | +=head1 DESCRIPTION | ||
74 | + | ||
75 | +Esta tabela lista os atendimentos com espera prioritária para uma | ||
76 | +categoria que foram "encaminhados" por outros guichês. É importante | ||
77 | +notar que um atendimento só pode ser encaminhado depois de ele ter | ||
78 | +sido inicialmente atendido por um outro guichê. Essa funcionalidade | ||
79 | +permite o redirecionamento de um atendimento para uma determinada | ||
80 | +área. | ||
81 | + | ||
82 | +=cut | ||
83 | + |