ipiranga-inovai-project-lib 1.8__py3-none-any.whl → 1.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
inovai/entities.py CHANGED
@@ -4,6 +4,9 @@ from sqlalchemy.ext.declarative import declarative_base
4
4
  from sqlalchemy.orm import relationship
5
5
 
6
6
  Base = declarative_base()
7
+ DATETIME_NOW = 'NOW()'
8
+ INTEGRATION_BATCH_KEY = 'fiscal.lote_integracao.cd_integr'
9
+ OBI_KIT_KEY = 'fiscal.kit_obi.no_seq_kit'
7
10
 
8
11
 
9
12
  class ObiIntegration(Base):
@@ -17,7 +20,7 @@ class ObiIntegration(Base):
17
20
  movement_employer_number = Column('cd_cnpj_movimentacao', String(14), nullable=False)
18
21
  issuance_date = Column('dt_emis', Date, nullable=False)
19
22
  movement_date = Column('dt_mov', DateTime, nullable=False)
20
- created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
23
+ created_at = Column('dt_incl', DateTime, nullable=False, server_default=DATETIME_NOW)
21
24
  request_id = Column('id_req', String(40), nullable=True)
22
25
  origin = Column('nm_sist_orig', String(50), nullable=True)
23
26
  type_id = Column('cd_tipo_param_obi', Integer, nullable=False)
@@ -38,6 +41,7 @@ class ObiIntegration(Base):
38
41
  "dt_incl": self.created_at,
39
42
  "id_req": self.request_id,
40
43
  "nm_sist_orig": self.origin,
44
+ "cd_tipo_param_obi": self.type_id
41
45
  }
42
46
 
43
47
  def __str__(self):
@@ -51,7 +55,7 @@ class ParamTypeObiKit(Base):
51
55
  type_id = Column('cd_tipo_param_obi', Integer, primary_key=True, nullable=False)
52
56
  name = Column('nm_tipo_param_obi', String(50))
53
57
  description = Column('ds_tipo_param_obi', String(200))
54
- created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
58
+ created_at = Column('dt_incl', DateTime, nullable=False, server_default=DATETIME_NOW)
55
59
  inactivation_date = Column('dt_inat', DateTime, nullable=False)
56
60
 
57
61
  integration_obi = relationship("ObiIntegration", back_populates="type")
@@ -69,7 +73,7 @@ class IntegrationObiBatch(Base):
69
73
  __tablename__ = 'lote_integracao_obi'
70
74
  __table_args__ = {'schema': 'fiscal'}
71
75
 
72
- integration_batch_id = Column('cd_integr', String(36), ForeignKey('fiscal.lote_integracao.cd_integr'),
76
+ integration_batch_id = Column('cd_integr', String(36), ForeignKey(INTEGRATION_BATCH_KEY),
73
77
  primary_key=True, nullable=False)
74
78
  integration_obi_id = Column('cd_seq_integr_obi', Integer, ForeignKey('fiscal.integracao_obi'
75
79
  '.cd_seq_integr_obi'),
@@ -91,7 +95,7 @@ class KitIntegrationObiStatus(Base):
91
95
 
92
96
  integration_obi_id = Column('cd_seq_integr_obi', Integer, ForeignKey('fiscal.integracao_obi.cd_seq_integr_obi'),
93
97
  primary_key=True, nullable=False)
94
- kit_id = Column('no_seq_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'),
98
+ kit_id = Column('no_seq_kit', Integer, ForeignKey(OBI_KIT_KEY),
95
99
  primary_key=True, nullable=False)
96
100
  integration_status = Column('ds_status_proc', String(20), nullable=False)
97
101
  created_at = Column('dt_incl', DateTime, nullable=False)
@@ -127,7 +131,7 @@ class IntegrationDocument(Base):
127
131
  issuance_date = Column('dt_emis_doc_integr', Date, nullable=False)
128
132
  fiscal_date = Column('dt_fisc', Date, nullable=False)
129
133
  created_at = Column('dt_hora_criacao', DateTime, nullable=False)
130
- updated_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
134
+ updated_at = Column('dt_incl', DateTime, nullable=False, server_default=DATETIME_NOW)
131
135
  request_id = Column('id_req_doc_fisc', String(40), nullable=True)
132
136
  origin = Column('nm_sist_orig', String(50), nullable=True)
133
137
  responsible_movement = Column('id_cnpj_mov', String(), nullable=True)
@@ -238,7 +242,7 @@ class BatchFileIntegration(Base):
238
242
 
239
243
  integration_file_id = Column('cd_dos_aq_integr', Integer, ForeignKey('fiscal.arquivo_integracao.no_seq_aq_integr'),
240
244
  primary_key=True, nullable=False)
241
- integration_batch_id = Column('cd_integr', String(36), ForeignKey('fiscal.lote_integracao.cd_integr'),
245
+ integration_batch_id = Column('cd_integr', String(36), ForeignKey(INTEGRATION_BATCH_KEY),
242
246
  primary_key=True, nullable=False)
243
247
  created_at = Column('dt_incl', DateTime, nullable=False)
244
248
 
@@ -257,12 +261,12 @@ class ParamProcessingKit(Base):
257
261
  __table_args__ = {'schema': 'fiscal'}
258
262
 
259
263
  param_processing_kit_id = Column('no_seq_proc', Numeric(precision=8, scale=0), primary_key=True, nullable=False)
260
- kit_id = Column('cd_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'), nullable=False)
264
+ kit_id = Column('cd_kit', Integer, ForeignKey(OBI_KIT_KEY), nullable=False)
261
265
  process_code = Column('cd_proc_obi', String(30))
262
266
  status = Column('id_status_param', Boolean, nullable=False)
263
267
  type_id = Column('cd_tipo_param_obi', Integer, ForeignKey('fiscal.tipo_param_kit_obi.cd_tipo_param_obi'), nullable=False)
264
268
  document_type = Column('cd_tipo_doc_integr', String(8))
265
- created_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
269
+ created_at = Column('dt_incl', DateTime, nullable=False, server_default=DATETIME_NOW)
266
270
 
267
271
  type = relationship("ParamTypeObiKit", back_populates="integration_processing")
268
272
 
@@ -281,7 +285,7 @@ class IntegrationProcessing(Base):
281
285
  __tablename__ = 'integracao_processamento'
282
286
  __table_args__ = {'schema': 'fiscal'}
283
287
 
284
- integration_batch_id = Column('cd_integr', String(36), ForeignKey('fiscal.lote_integracao.cd_integr'),
288
+ integration_batch_id = Column('cd_integr', String(36), ForeignKey(INTEGRATION_BATCH_KEY),
285
289
  primary_key=True, nullable=False)
286
290
  param_processing_kit_id = Column('no_seq_proc', Numeric(precision=8, scale=0),
287
291
  ForeignKey('fiscal.param_processamento_kit.no_seq_proc'),
@@ -304,7 +308,7 @@ class IntegrationDocumentBatch(Base):
304
308
  __tablename__ = 'lote_documento_integracao'
305
309
  __table_args__ = {'schema': 'fiscal'}
306
310
 
307
- integration_batch_id = Column('cd_integr', String(36), ForeignKey('fiscal.lote_integracao.cd_integr'),
311
+ integration_batch_id = Column('cd_integr', String(36), ForeignKey(INTEGRATION_BATCH_KEY),
308
312
  primary_key=True, nullable=False)
309
313
  integration_document_id = Column('cd_seq_doc_integr', Integer, ForeignKey('fiscal.documento_integracao'
310
314
  '.no_seq_doc_integr'),
@@ -353,7 +357,7 @@ class KitIntegrationDocumentStatus(Base):
353
357
 
354
358
  document_id = Column('no_seq_doc_integr', Integer, ForeignKey('fiscal.documento_integracao.no_seq_doc_integr'),
355
359
  primary_key=True, nullable=False)
356
- kit_id = Column('no_seq_kit', Integer, ForeignKey('fiscal.kit_obi.no_seq_kit'),
360
+ kit_id = Column('no_seq_kit', Integer, ForeignKey(OBI_KIT_KEY),
357
361
  primary_key=True, nullable=False)
358
362
  integration_status = Column('ds_status_proc', String(20), nullable=False)
359
363
  created_at = Column('dt_incl', DateTime, nullable=False)
inovai/enums.py CHANGED
@@ -29,17 +29,17 @@ class DocumentType(Enum):
29
29
 
30
30
 
31
31
  class IntegrationType(Enum):
32
- SERVICE = 'SERV'
33
- PRODUCT = 'PROD'
34
- ISS_SERVICE = "SERV_ISS"
35
- STOCK_MOVEMENT = 'MOVIMENTACAO_ESTOQUE'
36
- FINISHED_PRODUCT_WITHOUT_PACKAGING = 'PRODUTO_ACABADO_SEM_EMBALAGEM'
37
- FINISHED_PRODUCT_WITH_PACKAGING = 'PRODUTO_ACABADO_COM_EMBALAGEM'
38
- PRODUCTION_ORDER = 'ORDEM_PRODUCAO'
39
- CORRECTION_NOTE = 'CORRECAO_APONTAMENTO'
32
+ SERVICE = 1
33
+ ISS_SERVICE = 2
34
+ PRODUCT = 3
35
+ STOCK_MOVEMENT = 4
36
+ FINISHED_PRODUCT_WITHOUT_PACKAGING = 5
37
+ FINISHED_PRODUCT_WITH_PACKAGING = 6
38
+ PRODUCTION_ORDER = 7
39
+ CORRECTION_NOTE = 8
40
40
 
41
41
 
42
- class TaxType:
42
+ class TaxType(Enum):
43
43
  PIS = "PIS"
44
44
  IPI = "IPI"
45
45
  ISS = "ISS"
@@ -56,4 +56,3 @@ class TaxType:
56
56
  ICMSMONORET = "ICMSMONORET"
57
57
  CSLL = "CSLL"
58
58
  IRRF = "IRRF"
59
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 1.8
3
+ Version: 1.9
4
4
  Summary: Projeto criado para importação genérica de entidades
5
5
  Home-page: https://gitlab.ipirangacloud.com/clayton.monteiro.ext/ipiranga-inovai-project-lib
6
6
  Author: Clayton Sandes Monteiro
@@ -1,6 +1,6 @@
1
1
  inovai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- inovai/entities.py,sha256=RDaLem3K8R6CwEsZ0Jnva3Pk-em1Kb3fkkGwu33VBNM,17824
3
- inovai/enums.py,sha256=nlB6wncWucHdxc5IFB1Trro0UNAhC32iIRdn-g7zfP4,1315
2
+ inovai/entities.py,sha256=cGA8zlM8FUOoN_vRH2MWTv3p_2twj6_kDUwPUcmRmzA,17918
3
+ inovai/enums.py,sha256=_faYFS3EEPC2Me0nSb2SnfgJsjsfWTyhrIUbB4M5ouc,1183
4
4
  inovai/models/Endereco.py,sha256=Vft20vMwYwTXtEuh5NH7O5FxXVahnLmgaXMDOVdBxY4,3519
5
5
  inovai/models/NFe.py,sha256=3PiMvK6AODaagZU7KEpnjYfulz8PvcQYGChIa-QCvg0,13023
6
6
  inovai/models/NFeBoleto.py,sha256=tLWqsOlszA6UiJdxesJKQkgwNk_4DuI3NRBCYZh7RKc,5006
@@ -33,8 +33,8 @@ inovai/models/NFeVolume.py,sha256=_cayb-rrz1mSxQ3wFFnB4KCi524jtAsdTTcS4WQTBOc,19
33
33
  inovai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  inovai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  inovai/utils/util.py,sha256=tEFFoYhtyZk2pxor2vb23NWr3otPzPXTiTIf-VrGik4,366
36
- ipiranga_inovai_project_lib-1.8.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
37
- ipiranga_inovai_project_lib-1.8.dist-info/METADATA,sha256=1q5yXl6l4Xb6VXyiPZ-aQ4Wo1QyP6oLVPQF5ONglUug,518
38
- ipiranga_inovai_project_lib-1.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
- ipiranga_inovai_project_lib-1.8.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
40
- ipiranga_inovai_project_lib-1.8.dist-info/RECORD,,
36
+ ipiranga_inovai_project_lib-1.9.dist-info/LICENSE,sha256=UJ3ql8eZec9Y1kER7QSHAuvdgFPuL47asePHYmdzG_o,198
37
+ ipiranga_inovai_project_lib-1.9.dist-info/METADATA,sha256=GOax853eQls__hsuk7MI90pRtmR72rztnDi-EbqYgQg,518
38
+ ipiranga_inovai_project_lib-1.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
+ ipiranga_inovai_project_lib-1.9.dist-info/top_level.txt,sha256=BD-APH5oIEb_KDXwrfnZiu9QDsD9ttTEkYc32r9thqg,7
40
+ ipiranga_inovai_project_lib-1.9.dist-info/RECORD,,