ipiranga-inovai-project-lib 0.3__tar.gz → 0.4__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 0.3
3
+ Version: 0.4
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
@@ -27,6 +27,7 @@ class IntegrationDocument(Base):
27
27
  updated_at = Column('dt_incl', DateTime, nullable=False, server_default='NOW()')
28
28
  request_id = Column('id_req_doc_fisc', String(40), nullable=True)
29
29
  origin = Column('nm_sist_orig', String(50), nullable=True)
30
+ responsible_movement = Column('id_cnpj_mov', String(), nullable=True)
30
31
 
31
32
  integration_batch = relationship('IntegrationDocumentBatch', back_populates='integration_document')
32
33
  kit_integration_document_status = relationship("KitIntegrationDocumentStatus", back_populates="integration_document")
@@ -48,7 +49,9 @@ class IntegrationDocument(Base):
48
49
  "dt_fisc": self.fiscal_date.strftime("%Y-%m-%d") if self.fiscal_date is not None else None,
49
50
  "dt_hora_criacao": self.created_at.strftime("%Y-%m-%d %H:%M:%S") if self.created_at is not None else None,
50
51
  "dt_incl": self.updated_at.strftime("%Y-%m-%d %H:%M:%S") if self.updated_at is not None else None,
51
- "request_id": self.request_id
52
+ "request_id": self.request_id,
53
+ "nm_sist_orig": self.origin,
54
+ "id_cnpj_mov": self.responsible_movement
52
55
  }
53
56
 
54
57
  def __str__(self):
@@ -92,16 +95,18 @@ class IntegrationBatch(Base):
92
95
  start_integration_date = Column('dt_hora_ini_lote_integr', DateTime)
93
96
  end_integration_date = Column('dt_hora_fim_lote_integr', DateTime)
94
97
  created_at = Column('dt_incl', DateTime, nullable=False)
98
+ status = Column('ds_status_integr', String(), nullable=False)
95
99
 
96
100
  batch_files = relationship('BatchFileIntegration', back_populates='integration_batch')
97
101
  integration_processing = relationship('IntegrationProcessing', back_populates='integration_batch')
98
102
 
99
- def __init__(self, integration_batch_id, employer_number, first_date_document, last_date_document):
103
+ def __init__(self, integration_batch_id, employer_number, first_date_document, last_date_document, status):
100
104
  super().__init__()
101
105
  self.integration_batch_id = integration_batch_id
102
106
  self.employer_number = employer_number
103
107
  self.first_date_document = first_date_document
104
108
  self.last_date_document = last_date_document
109
+ self.status = status
105
110
  self.start_integration_date = datetime.now()
106
111
  self.created_at = self.start_integration_date
107
112
 
@@ -4,10 +4,13 @@ from enum import Enum
4
4
  class DocumentStatus(Enum):
5
5
  INTEGRATED = 'INTEGRADO'
6
6
  PENDING_INTEGRATION = 'PENDENTE_INTEGRACAO'
7
- ERROR_INTEGRATION = 'ERRO_INTEGRACAO'
8
7
 
9
8
 
10
9
  class DocumentMovementType(Enum):
11
10
  INPUT = 'E',
12
11
  OUTPUT = 'S'
13
12
 
13
+
14
+ class ResponsibleMovement(Enum):
15
+ ISSUER = 'EMITENTE'
16
+ RECIPIENT = 'DESTINATARIO'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipiranga-inovai-project-lib
3
- Version: 0.3
3
+ Version: 0.4
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
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="ipiranga-inovai-project-lib",
5
- version="0.3",
5
+ version="0.4",
6
6
  packages=find_packages(),
7
7
  description="Projeto criado para importação genérica de entidades",
8
8
  long_description=open('README.md').read(),