first commit
This commit is contained in:
@@ -0,0 +1,312 @@
|
||||
<?php
|
||||
namespace WorkbloomERP\Module\v0\Contato\Models;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use WorkbloomERP\Exceptions\AppException;
|
||||
|
||||
class ContatoModel {
|
||||
public function __construct(
|
||||
private ?int $id = null,
|
||||
private ?string $uuid = null,
|
||||
private ?int $empresa_id = null,
|
||||
private ?bool $is_active = null,
|
||||
private ?string $tipo = null,
|
||||
private ?string $nome_empresarial = null,
|
||||
private ?string $nome_fantasia = null,
|
||||
private ?string $personalidade = null,
|
||||
private ?string $document_cpf = null,
|
||||
private ?string $document_cnpj = null,
|
||||
private ?int $regime_tributario = null,
|
||||
private ?int $contribuinte_icms = null,
|
||||
private ?string $orgao_publico = null,
|
||||
private ?string $document_ie = null,
|
||||
private ?string $document_im = null,
|
||||
private ?string $document_is = null,
|
||||
private ?string $end_pais = null,
|
||||
private ?string $end_cep = null,
|
||||
private ?string $end_ibge = null,
|
||||
private ?string $end_logradouro = null,
|
||||
private ?string $end_numero = null,
|
||||
private ?string $end_complemento = null,
|
||||
private ?string $end_bairro = null,
|
||||
private ?string $end_cidade = null,
|
||||
private ?string $end_uf = null,
|
||||
private ?string $info_email = null,
|
||||
private ?string $info_email_nfe = null,
|
||||
private ?string $info_observacao = null,
|
||||
private ?string $info_telefone = null,
|
||||
private ?int $info_uso_consumo_ibs_cbs = null,
|
||||
private ?DateTimeImmutable $created_at = null,
|
||||
private ?DateTimeImmutable $updated_at = null,
|
||||
private ?DateTimeImmutable $deleted_at = null,
|
||||
) {}
|
||||
|
||||
public function toArray(): array {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'uuid' => $this->getUuid(),
|
||||
'empresa_id' => $this->getEmpresaId(),
|
||||
'is_active' => $this->getIsActive(),
|
||||
'tipo' => $this->getTipo(),
|
||||
'nome_empresarial' => $this->getNomeEmpresarial(),
|
||||
'nome_fantasia' => $this->getNomeFantasia(),
|
||||
'personalidade' => $this->getPersonalidade(),
|
||||
'document_cpf' => $this->getDocumentCpf(),
|
||||
'document_cnpj' => $this->getDocumentCnpj(),
|
||||
'regime_tributario' => $this->getRegimeTributario(),
|
||||
'contribuinte_icms' => $this->getContribuinteIcms(),
|
||||
'orgao_publico' => $this->getOrgaoPublico(),
|
||||
'document_ie' => $this->getDocumentIe(),
|
||||
'document_im' => $this->getDocumentIm(),
|
||||
'document_is' => $this->getDocumentIs(),
|
||||
'end_pais' => $this->getEndPais(),
|
||||
'end_cep' => $this->getEndCep(),
|
||||
'end_ibge' => $this->getEndIbge(),
|
||||
'end_logradouro' => $this->getEndLogradouro(),
|
||||
'end_numero' => $this->getEndNumero(),
|
||||
'end_complemento' => $this->getEndComplemento(),
|
||||
'end_bairro' => $this->getEndBairro(),
|
||||
'end_cidade' => $this->getEndCidade(),
|
||||
'end_uf' => $this->getEndUf(),
|
||||
'info_email' => $this->getInfoEmail(),
|
||||
'info_email_nfe' => $this->getInfoEmailNfe(),
|
||||
'info_observacao' => $this->getInfoObservacao(),
|
||||
'info_telefone' => $this->getInfoTelefone(),
|
||||
'info_uso_consumo_ibs_cbs' => $this->getInfoUsoConsumoIbsCbs(),
|
||||
'created_at' => $this->getCreatedAt() ? $this->getCreatedAt()->format(format: 'Y-m-d H:i:s') : null,
|
||||
'updated_at' => $this->getUpdatedAt() ? $this->getUpdatedAt()->format(format: 'Y-m-d H:i:s') : null,
|
||||
'deleted_at' => $this->getDeletedAt() ? $this->getDeletedAt()->format(format: 'Y-m-d H:i:s') : null,
|
||||
];
|
||||
}
|
||||
|
||||
public function setId(?int $id): void {
|
||||
$this->id = $id;
|
||||
}
|
||||
public function getId(): ?int {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setUuid(?string $uuid): void {
|
||||
$this->uuid = $uuid;
|
||||
}
|
||||
public function getUuid(): ?string {
|
||||
return $this->uuid;
|
||||
}
|
||||
|
||||
public function setEmpresaId(?int $empresa_id): void {
|
||||
$this->empresa_id = $empresa_id;
|
||||
}
|
||||
public function getEmpresaId(): ?int {
|
||||
return $this->empresa_id;
|
||||
}
|
||||
|
||||
public function setIsActive(?bool $is_active): void {
|
||||
$this->is_active = $is_active;
|
||||
}
|
||||
public function getIsActive(): ?bool {
|
||||
return $this->is_active;
|
||||
}
|
||||
|
||||
public function setTipo(?string $tipo): void {
|
||||
$this->tipo = $tipo;
|
||||
}
|
||||
public function getTipo(): ?string {
|
||||
return $this->tipo;
|
||||
}
|
||||
|
||||
public function setNomeEmpresarial(?string $nome_empresarial): void {
|
||||
$this->nome_empresarial = $nome_empresarial;
|
||||
}
|
||||
public function getNomeEmpresarial(): ?string {
|
||||
return $this->nome_empresarial;
|
||||
}
|
||||
|
||||
public function setNomeFantasia(?string $nome_fantasia): void {
|
||||
$this->nome_fantasia = $nome_fantasia;
|
||||
}
|
||||
public function getNomeFantasia(): ?string {
|
||||
return $this->nome_fantasia;
|
||||
}
|
||||
|
||||
public function setPersonalidade(?string $personalidade): void {
|
||||
$this->personalidade = $personalidade;
|
||||
}
|
||||
public function getPersonalidade(): ?string {
|
||||
return $this->personalidade;
|
||||
}
|
||||
|
||||
public function setDocumentCpf(?string $document_cpf): void {
|
||||
$this->document_cpf = $document_cpf;
|
||||
}
|
||||
public function getDocumentCpf(): ?string {
|
||||
return $this->document_cpf;
|
||||
}
|
||||
|
||||
public function setDocumentCnpj(?string $document_cnpj): void {
|
||||
$this->document_cnpj = $document_cnpj;
|
||||
}
|
||||
public function getDocumentCnpj(): ?string {
|
||||
return $this->document_cnpj;
|
||||
}
|
||||
|
||||
public function setRegimeTributario(?int $regime_tributario): void {
|
||||
$this->regime_tributario = $regime_tributario;
|
||||
}
|
||||
public function getRegimeTributario(): ?int {
|
||||
return $this->regime_tributario;
|
||||
}
|
||||
|
||||
public function setContribuinteIcms(?int $contribuinte_icms): void {
|
||||
$this->contribuinte_icms = $contribuinte_icms;
|
||||
}
|
||||
public function getContribuinteIcms(): ?int {
|
||||
return $this->contribuinte_icms;
|
||||
}
|
||||
|
||||
public function setOrgaoPublico(?string $orgao_publico): void {
|
||||
$this->orgao_publico = $orgao_publico;
|
||||
}
|
||||
public function getOrgaoPublico(): ?string {
|
||||
return $this->orgao_publico;
|
||||
}
|
||||
|
||||
public function setDocumentIe(?string $document_ie): void {
|
||||
$this->document_ie = $document_ie;
|
||||
}
|
||||
public function getDocumentIe(): ?string {
|
||||
return $this->document_ie;
|
||||
}
|
||||
|
||||
public function setDocumentIm(?string $document_im): void {
|
||||
$this->document_im = $document_im;
|
||||
}
|
||||
public function getDocumentIm(): ?string {
|
||||
return $this->document_im;
|
||||
}
|
||||
|
||||
public function setDocumentIs(?string $document_is): void {
|
||||
$this->document_is = $document_is;
|
||||
}
|
||||
public function getDocumentIs(): ?string {
|
||||
return $this->document_is;
|
||||
}
|
||||
|
||||
public function setEndPais(?string $end_pais): void {
|
||||
$this->end_pais = $end_pais;
|
||||
}
|
||||
public function getEndPais(): ?string {
|
||||
return $this->end_pais;
|
||||
}
|
||||
|
||||
public function setEndCep(?string $end_cep): void {
|
||||
$this->end_cep = $end_cep;
|
||||
}
|
||||
public function getEndCep(): ?string {
|
||||
return $this->end_cep;
|
||||
}
|
||||
|
||||
public function setEndIbge(?string $end_ibge): void {
|
||||
$this->end_ibge = $end_ibge;
|
||||
}
|
||||
public function getEndIbge(): ?string {
|
||||
return $this->end_ibge;
|
||||
}
|
||||
|
||||
public function setEndLogradouro(?string $end_logradouro): void {
|
||||
$this->end_logradouro = $end_logradouro;
|
||||
}
|
||||
public function getEndLogradouro(): ?string {
|
||||
return $this->end_logradouro;
|
||||
}
|
||||
|
||||
public function setEndNumero(?string $end_numero): void {
|
||||
$this->end_numero = $end_numero;
|
||||
}
|
||||
public function getEndNumero(): ?string {
|
||||
return $this->end_numero;
|
||||
}
|
||||
|
||||
public function setEndComplemento(?string $end_complemento): void {
|
||||
$this->end_complemento = $end_complemento;
|
||||
}
|
||||
public function getEndComplemento(): ?string {
|
||||
return $this->end_complemento;
|
||||
}
|
||||
|
||||
public function setEndBairro(?string $end_bairro): void {
|
||||
$this->end_bairro = $end_bairro;
|
||||
}
|
||||
public function getEndBairro(): ?string {
|
||||
return $this->end_bairro;
|
||||
}
|
||||
|
||||
public function setEndCidade(?string $end_cidade): void {
|
||||
$this->end_cidade = $end_cidade;
|
||||
}
|
||||
public function getEndCidade(): ?string {
|
||||
return $this->end_cidade;
|
||||
}
|
||||
|
||||
public function setEndUf(?string $end_uf): void {
|
||||
$this->end_uf = $end_uf;
|
||||
}
|
||||
public function getEndUf(): ?string {
|
||||
return $this->end_uf;
|
||||
}
|
||||
|
||||
public function setInfoEmail(?string $info_email): void {
|
||||
$this->info_email = $info_email;
|
||||
}
|
||||
public function getInfoEmail(): ?string {
|
||||
return $this->info_email;
|
||||
}
|
||||
|
||||
public function setInfoEmailNfe(?string $info_email_nfe): void {
|
||||
$this->info_email_nfe = $info_email_nfe;
|
||||
}
|
||||
public function getInfoEmailNfe(): ?string {
|
||||
return $this->info_email_nfe;
|
||||
}
|
||||
|
||||
public function setInfoObservacao(?string $info_observacao): void {
|
||||
$this->info_observacao = $info_observacao;
|
||||
}
|
||||
public function getInfoObservacao(): ?string {
|
||||
return $this->info_observacao;
|
||||
}
|
||||
|
||||
public function setInfoTelefone(?string $info_telefone): void {
|
||||
$this->info_telefone = $info_telefone;
|
||||
}
|
||||
public function getInfoTelefone(): ?string {
|
||||
return $this->info_telefone;
|
||||
}
|
||||
|
||||
public function setInfoUsoConsumoIbsCbs(?int $info_uso_consumo_ibs_cbs): void {
|
||||
$this->info_uso_consumo_ibs_cbs = $info_uso_consumo_ibs_cbs;
|
||||
}
|
||||
public function getInfoUsoConsumoIbsCbs(): ?int {
|
||||
return $this->info_uso_consumo_ibs_cbs;
|
||||
}
|
||||
|
||||
public function setCreatedAt(?DateTimeImmutable $created_at): void {
|
||||
$this->created_at = $created_at;
|
||||
}
|
||||
public function getCreatedAt(): ?DateTimeImmutable {
|
||||
return $this->created_at;
|
||||
}
|
||||
|
||||
public function setUpdatedAt(?DateTimeImmutable $updated_at): void {
|
||||
$this->updated_at = $updated_at;
|
||||
}
|
||||
public function getUpdatedAt(): ?DateTimeImmutable {
|
||||
return $this->updated_at;
|
||||
}
|
||||
|
||||
public function setDeletedAt(?DateTimeImmutable $deleted_at): void {
|
||||
$this->deleted_at = $deleted_at;
|
||||
}
|
||||
public function getDeletedAt(): ?DateTimeImmutable {
|
||||
return $this->deleted_at;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user