sticutils 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1cb5c6be2bf9c77d9395a51deda2d90274d346d29645de2a391d54f83008331
4
- data.tar.gz: eceb52db3459f26a1e073ee3abd3441af22da4326823523a5250fc8936e9fa3f
3
+ metadata.gz: 8c30f23a34f71a55823bc0190e50c2084bc0da113cbf74d11355e0994524b124
4
+ data.tar.gz: 264d43e4e3592c0c18aa50eb2e26dbf46f9ec0fb89369082bd80d3ba670552ec
5
5
  SHA512:
6
- metadata.gz: e22da5869f7b162c61f3c77b28cc68d3bf3f0a89f7660bf994e865b9997e59b12923e781fc31daba78ff6b33e73f5a6e6995e8a35043c47c226591a00f7511b6
7
- data.tar.gz: c5a185c46404659cbfafcb4eba6035738eb88a410bd9546db96a5a2f1e67ee0f63a109954d4f28bb59471355e5e257f3b48b9f65142f1dd75a7958671a7444c9
6
+ metadata.gz: 628549bab03ca620c384ceddd9f640d225500da719acae8de046ef6c20d6214570c4302fc25e9c6290102a9ea4999b5cd100976ca527d4f4eecc14d92f9a6fe2
7
+ data.tar.gz: 6b77428d6ab2244fe5a4729e42dbc9a21bd18421ccf73595bee68f934de64c3d184f150bb3bbdf29f4158085b98ff4ae21e57597790d7f8cda93450816dea29c
@@ -3,10 +3,15 @@ class Intranet::GlobalPrepessoafisica < Intranet::IntranetRecord
3
3
 
4
4
  belongs_to :cidade_nascimento, :class_name => 'GlobalCidade', :foreign_key => :nascimentoCidade_id
5
5
  belongs_to :global_endereco, :class_name => 'GlobalEndereco', :foreign_key => :endereco_id
6
- belongs_to :global_cidade, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
6
+ belongs_to :cidade_titulo, :class_name => 'GlobalCidade', :foreign_key => :tituloEleitorCidade_id
7
7
  belongs_to :global_estado, :class_name => 'GlobalEstado', :foreign_key => :rgOrgaoExpedidorUF_sigla
8
- has_many :global_prepessoafisica_contasbancarias, :class_name => 'GlobalPrepessoafisicaContasbancaria'
9
- has_many :global_prepessoafisica_contatos, :class_name => 'GlobalPrepessoafisicaContato'
10
8
  has_many :tjpi_predependentes, :class_name => 'TjpiPredependente', foreign_key: :prePessoaFisica_id
11
- has_many :tjpi_previnculados, :class_name => 'TjpiPrevinculado'
9
+
10
+ has_many :global_prepessoafisica_contasbancarias, class_name: 'GlobalPrepessoafisicaContasbancaria'
11
+ has_many :global_prepessoafisica_contatos, class_name: 'GlobalPrepessoafisicaContato', foreign_key: :pessoaFisica_id
12
+ has_many :global_contatos, through: :global_prepessoafisica_contatos
13
+
14
+ has_one :tjpi_previnculados, :class_name => 'TjpiPrevinculado', foreign_key: :prePessoaFisica_id
15
+ has_one :tjpi_vinculado, :class_name => 'TjpiPrevinculado', foreign_key: :prePessoaFisica_id
16
+ has_many :tjpi_vinculos, through: :tjpi_vinculado, source: :tjpi_vinculo_principal
12
17
  end
@@ -9,11 +9,18 @@ class Intranet::TjpiPrevinculado < Intranet::IntranetRecord
9
9
  has_many :tjpi_previnculado_manifestacoes, :class_name => 'TjpiPrevinculadoManifestaco'
10
10
  has_many :tjpi_previnculadopendencia, :class_name => 'TjpiPrevinculadopendencium'
11
11
  has_many :tjpi_previnculadopendencia, :class_name => 'TjpiPrevinculadopendencium'
12
- has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
13
- has_many :tjpi_vinculos, :class_name => 'TjpiVinculo'
12
+ # has_many :tjpi_vinculados, :class_name => 'TjpiVinculado'
13
+ # has_many :tjpi_vinculos, :class_name => 'TjpiVinculo'
14
+
15
+ belongs_to :tjpi_vinculo_principal, :class_name => 'TjpiVinculo', foreign_key: :vinculoPrincipal_id
16
+ belongs_to :tjpi_vinculo, :class_name => 'TjpiVinculo', foreign_key: :vinculoPrincipal_id
14
17
 
15
18
  has_many :tjpi_previnculado_declaracoes, class_name: 'TjpiPrevinculadoDeclaracao', foreign_key: :preVinculado_id
16
19
  belongs_to :tjpi_previnculadointervencao_ultima, class_name: 'TjpiPrevinculadointervencao', foreign_key: :intervencao_id
17
20
  belongs_to :tjpi_previnculadointervencao_anterior, class_name: 'TjpiPrevinculadointervencao', foreign_key: :anterior_id
18
21
  has_many :tjpi_previnculadointervencoes, class_name: 'TjpiPrevinculadointervencao', foreign_key: :preVinculado_id
22
+
23
+ def tjpi_vinculos
24
+ [self.tjpi_vinculo_principal]
25
+ end
19
26
  end
@@ -1,3 +1,3 @@
1
1
  module Sticutils
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-22 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails