CompraServicoEntity
extends Entity
in package
Table of Contents
Constants
- auditlog = ['exclude_fields' => ['DataHora', 'datahoraUpdate', 'idUsuarioInsert'], 'object_rel' => 'idCompraServico']
- Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
- const_values = []
- database = \config\Config::DB_DEFAULT
- db_table = 'cad_servico_compra'
- pk_field = 'idCompraServico'
- sanitize = ['idPedidoFornec' => 'onlyNumber', 'dtEntregaServico' => 'date']
- security = []
- Allowed keys: 'select': <...> 'update': <...> 'delete': <...> 'insert': <...>
- tracking = true
- validations = ['idEntidadeFornecedor' => ['required' => 'O campo Fornecedor é requerido.'], 'idPedidoFornec' => ['required' => 'O campo Número Pedido é requerido'], 'data' => ['required' => 'O campo Data Pedido é requerido'], 'idEntidadeSolicitante' => ['required' => 'O campo Solicitante é requerido'], 'idResponsavel' => ['required' => 'O campo Responsável é requerido'], 'status' => ['required' => 'O campo Status Serviço é requerido']]
Properties
- $AnoAgricola : mixed
- $data : mixed
- $datahoraInsert : mixed
- $datahoraUpdate : mixed
- $descricao : mixed
- $dtEntregaServico : mixed
- $idCompraServico : mixed
- $idContasPagar : mixed
- $idDepartamento : mixed
- $idEntidadeFornecedor : mixed
- $idEntidadeProdutor : mixed
- $idEntidadeSolicitante : mixed
- $idPedidoFornec : mixed
- $idResponsavel : mixed
- $idUsuarioInsert : mixed
- $idUsuarioUpdate : mixed
- $idVariavelControle : mixed
- $status : mixed
- $total : mixed
- $totalAnexo : mixed
Methods
- __construct() : mixed
- delete() : mixed
- delete_where() : mixed
- getAnoAgricola() : mixed
- Get the value of AnoAgricola
- getAuditlog() : mixed
- getConst() : mixed
- getConstObj() : mixed
- getData() : mixed
- Get the value of data
- getDatabase() : mixed
- getDatahoraInsert() : mixed
- Get the value of datahoraInsert
- getDatahoraUpdate() : mixed
- Get the value of datahoraUpdate
- getDBDriver() : mixed
- getDBTable() : mixed
- getDescricao() : mixed
- Get the value of descricao
- getDtEntregaServico() : mixed
- Get the value of dtEntregaServico
- getIdCompraServico() : mixed
- Get the value of idCompraServico
- getIdContasPagar() : mixed
- Get the value of idContasPagar
- getIdDepartamento() : mixed
- Get the value of idDepartamento
- getIdEntidadeFornecedor() : mixed
- Get the value of idEntidadeFornecedor
- getIdEntidadeProdutor() : mixed
- Get the value of idEntidadeProdutor
- getIdEntidadeSolicitante() : mixed
- Get the value of idEntidadeSolicitante
- getIdPedidoFornec() : mixed
- Get the value of idPedidoFornec
- getIdResponsavel() : mixed
- Get the value of idResponsavel
- getIdUsuarioInsert() : mixed
- Get the value of idUsuarioInsert
- getIdUsuarioUpdate() : mixed
- Get the value of idUsuarioUpdate
- getIdVariavelControle() : mixed
- Get the value of idVariavelControle
- getStatus() : mixed
- Get the value of status
- getTable() : mixed
- getTotal() : mixed
- Get the value of total
- getTotalAnexo() : mixed
- Get the value of totalAnexo
- hasField() : mixed
- insert() : null|Entity
- insert_or_select() : null|Entity
- Funcao que insere ou seleciona se existe
- insert_or_update() : array<string|int, mixed>
- Funcao que insere ou atualiza uma entidade no banco de dados
- securityDelete() : bool
- securityInsert() : bool
- securitySelect() : array<string|int, mixed>
- securityUpdate() : bool
- setAnoAgricola() : self
- Set the value of AnoAgricola
- setData() : self
- Set the value of data
- setDatahoraInsert() : self
- Set the value of datahoraInsert
- setDatahoraUpdate() : self
- Set the value of datahoraUpdate
- setDescricao() : self
- Set the value of descricao
- setDtEntregaServico() : self
- Set the value of dtEntregaServico
- setIdCompraServico() : self
- Set the value of idCompraServico
- setIdContasPagar() : self
- Set the value of idContasPagar
- setIdDepartamento() : self
- Set the value of idDepartamento
- setIdEntidadeFornecedor() : self
- Set the value of idEntidadeFornecedor
- setIdEntidadeProdutor() : self
- Set the value of idEntidadeProdutor
- setIdEntidadeSolicitante() : self
- Set the value of idEntidadeSolicitante
- setIdPedidoFornec() : self
- Set the value of idPedidoFornec
- setIdResponsavel() : self
- Set the value of idResponsavel
- setIdUsuarioInsert() : self
- Set the value of idUsuarioInsert
- setIdUsuarioUpdate() : self
- Set the value of idUsuarioUpdate
- setIdVariavelControle() : self
- Set the value of idVariavelControle
- setStatus() : self
- Set the value of status
- setTotal() : self
- Set the value of total
- setTotalAnexo() : self
- Set the value of totalAnexo
- update() : mixed
- A função update pode atualizar uma Entity já instanciada, desde que a chave primária esteja setada, ou pode atualizar uma Entity vazia informando o valor da chave primária no segundo parâmetro (pk_value)
- validateFields() : bool
- where() : Collection
- Rudimentary ORM functions
Constants
auditlog
Allowed keys: 'exclude_fields': <...> 'object_rel': <...>
public
mixed
auditlog
= ['exclude_fields' => ['DataHora', 'datahoraUpdate', 'idUsuarioInsert'], 'object_rel' => 'idCompraServico']
const_values
public
mixed
const_values
= []
database
public
mixed
database
= \config\Config::DB_DEFAULT
db_table
public
mixed
db_table
= 'cad_servico_compra'
pk_field
public
mixed
pk_field
= 'idCompraServico'
sanitize
public
mixed
sanitize
= ['idPedidoFornec' => 'onlyNumber', 'dtEntregaServico' => 'date']
security
Allowed keys: 'select': <...> 'update': <...> 'delete': <...> 'insert': <...>
public
mixed
security
= []
tracking
public
mixed
tracking
= true
validations
public
mixed
validations
= ['idEntidadeFornecedor' => ['required' => 'O campo Fornecedor é requerido.'], 'idPedidoFornec' => ['required' => 'O campo Número Pedido é requerido'], 'data' => ['required' => 'O campo Data Pedido é requerido'], 'idEntidadeSolicitante' => ['required' => 'O campo Solicitante é requerido'], 'idResponsavel' => ['required' => 'O campo Responsável é requerido'], 'status' => ['required' => 'O campo Status Serviço é requerido']]
Properties
$AnoAgricola
private
mixed
$AnoAgricola
$data
private
mixed
$data
$datahoraInsert
private
mixed
$datahoraInsert
$datahoraUpdate
private
mixed
$datahoraUpdate
$descricao
private
mixed
$descricao
$dtEntregaServico
private
mixed
$dtEntregaServico
$idCompraServico
private
mixed
$idCompraServico
$idContasPagar
private
mixed
$idContasPagar
$idDepartamento
private
mixed
$idDepartamento
$idEntidadeFornecedor
private
mixed
$idEntidadeFornecedor
$idEntidadeProdutor
private
mixed
$idEntidadeProdutor
$idEntidadeSolicitante
private
mixed
$idEntidadeSolicitante
$idPedidoFornec
private
mixed
$idPedidoFornec
$idResponsavel
private
mixed
$idResponsavel
$idUsuarioInsert
private
mixed
$idUsuarioInsert
$idUsuarioUpdate
private
mixed
$idUsuarioUpdate
$idVariavelControle
private
mixed
$idVariavelControle
$status
private
mixed
$status
$total
private
mixed
$total
$totalAnexo
private
mixed
$totalAnexo
Methods
__construct()
public
__construct([array<string|int, mixed> $values = [] ]) : mixed
Parameters
- $values : array<string|int, mixed> = []
delete()
public
delete(mixed $motivo) : mixed
Parameters
- $motivo : mixed
delete_where()
public
static delete_where(mixed $motivo[, mixed $where = [] ]) : mixed
Parameters
- $motivo : mixed
- $where : mixed = []
getAnoAgricola()
Get the value of AnoAgricola
public
getAnoAgricola() : mixed
getAuditlog()
public
getAuditlog([string|null $key = null ]) : mixed
Parameters
- $key : string|null = null
getConst()
public
static getConst(string $field[, mixed $const_value = null ]) : mixed
Parameters
- $field : string
- $const_value : mixed = null
getConstObj()
public
static getConstObj(string $field[, mixed $const_value = null ]) : mixed
Parameters
- $field : string
- $const_value : mixed = null
getData()
Get the value of data
public
getData() : mixed
getDatabase()
public
getDatabase() : mixed
getDatahoraInsert()
Get the value of datahoraInsert
public
getDatahoraInsert() : mixed
getDatahoraUpdate()
Get the value of datahoraUpdate
public
getDatahoraUpdate() : mixed
getDBDriver()
public
static getDBDriver() : mixed
getDBTable()
public
static getDBTable() : mixed
getDescricao()
Get the value of descricao
public
getDescricao() : mixed
getDtEntregaServico()
Get the value of dtEntregaServico
public
getDtEntregaServico() : mixed
getIdCompraServico()
Get the value of idCompraServico
public
getIdCompraServico() : mixed
getIdContasPagar()
Get the value of idContasPagar
public
getIdContasPagar() : mixed
getIdDepartamento()
Get the value of idDepartamento
public
getIdDepartamento() : mixed
getIdEntidadeFornecedor()
Get the value of idEntidadeFornecedor
public
getIdEntidadeFornecedor() : mixed
getIdEntidadeProdutor()
Get the value of idEntidadeProdutor
public
getIdEntidadeProdutor() : mixed
getIdEntidadeSolicitante()
Get the value of idEntidadeSolicitante
public
getIdEntidadeSolicitante() : mixed
getIdPedidoFornec()
Get the value of idPedidoFornec
public
getIdPedidoFornec() : mixed
getIdResponsavel()
Get the value of idResponsavel
public
getIdResponsavel() : mixed
getIdUsuarioInsert()
Get the value of idUsuarioInsert
public
getIdUsuarioInsert() : mixed
getIdUsuarioUpdate()
Get the value of idUsuarioUpdate
public
getIdUsuarioUpdate() : mixed
getIdVariavelControle()
Get the value of idVariavelControle
public
getIdVariavelControle() : mixed
getStatus()
Get the value of status
public
getStatus() : mixed
getTable()
public
getTable() : mixed
getTotal()
Get the value of total
public
getTotal() : mixed
getTotalAnexo()
Get the value of totalAnexo
public
getTotalAnexo() : mixed
hasField()
public
static hasField(mixed $field) : mixed
Parameters
- $field : mixed
insert()
public
insert() : null|Entity
Return values
null|Entityinsert_or_select()
Funcao que insere ou seleciona se existe
public
insert_or_select([mixed $where = [] ]) : null|Entity
Parameters
- $where : mixed = []
Return values
null|Entityinsert_or_update()
Funcao que insere ou atualiza uma entidade no banco de dados
public
insert_or_update([mixed $where = [] ][, mixed $update_fields = ['*'] ]) : array<string|int, mixed>
Parameters
- $where : mixed = []
- $update_fields : mixed = ['*']
Return values
array<string|int, mixed>securityDelete()
public
securityDelete(mixed $table, mixed $where) : bool
Parameters
- $table : mixed
- $where : mixed
Return values
boolsecurityInsert()
public
securityInsert(mixed $fields) : bool
Parameters
- $fields : mixed
Return values
bool —return 'true' if the security function didn't find any security issue and 'false' otherwise
securitySelect()
public
securitySelect(mixed $table, mixed $fields, mixed $where) : array<string|int, mixed>
Parameters
- $table : mixed
- $fields : mixed
- $where : mixed
Return values
array<string|int, mixed> —return an array with information to be appended in the SQL select
securityUpdate()
public
securityUpdate(mixed $fields, mixed $where) : bool
Parameters
- $fields : mixed
- $where : mixed
Return values
bool —return 'true' if the security function didn't find any security issue and 'false' otherwise
setAnoAgricola()
Set the value of AnoAgricola
public
setAnoAgricola(mixed $AnoAgricola) : self
Parameters
- $AnoAgricola : mixed
Return values
selfsetData()
Set the value of data
public
setData(mixed $data) : self
Parameters
- $data : mixed
Return values
selfsetDatahoraInsert()
Set the value of datahoraInsert
public
setDatahoraInsert(mixed $datahoraInsert) : self
Parameters
- $datahoraInsert : mixed
Return values
selfsetDatahoraUpdate()
Set the value of datahoraUpdate
public
setDatahoraUpdate(mixed $datahoraUpdate) : self
Parameters
- $datahoraUpdate : mixed
Return values
selfsetDescricao()
Set the value of descricao
public
setDescricao(mixed $descricao) : self
Parameters
- $descricao : mixed
Return values
selfsetDtEntregaServico()
Set the value of dtEntregaServico
public
setDtEntregaServico(mixed $dtEntregaServico) : self
Parameters
- $dtEntregaServico : mixed
Return values
selfsetIdCompraServico()
Set the value of idCompraServico
public
setIdCompraServico(mixed $idCompraServico) : self
Parameters
- $idCompraServico : mixed
Return values
selfsetIdContasPagar()
Set the value of idContasPagar
public
setIdContasPagar(mixed $idContasPagar) : self
Parameters
- $idContasPagar : mixed
Return values
selfsetIdDepartamento()
Set the value of idDepartamento
public
setIdDepartamento(mixed $idDepartamento) : self
Parameters
- $idDepartamento : mixed
Return values
selfsetIdEntidadeFornecedor()
Set the value of idEntidadeFornecedor
public
setIdEntidadeFornecedor(mixed $idEntidadeFornecedor) : self
Parameters
- $idEntidadeFornecedor : mixed
Return values
selfsetIdEntidadeProdutor()
Set the value of idEntidadeProdutor
public
setIdEntidadeProdutor(mixed $idEntidadeProdutor) : self
Parameters
- $idEntidadeProdutor : mixed
Return values
selfsetIdEntidadeSolicitante()
Set the value of idEntidadeSolicitante
public
setIdEntidadeSolicitante(mixed $idEntidadeSolicitante) : self
Parameters
- $idEntidadeSolicitante : mixed
Return values
selfsetIdPedidoFornec()
Set the value of idPedidoFornec
public
setIdPedidoFornec(mixed $idPedidoFornec) : self
Parameters
- $idPedidoFornec : mixed
Return values
selfsetIdResponsavel()
Set the value of idResponsavel
public
setIdResponsavel(mixed $idResponsavel) : self
Parameters
- $idResponsavel : mixed
Return values
selfsetIdUsuarioInsert()
Set the value of idUsuarioInsert
public
setIdUsuarioInsert(mixed $idUsuarioInsert) : self
Parameters
- $idUsuarioInsert : mixed
Return values
selfsetIdUsuarioUpdate()
Set the value of idUsuarioUpdate
public
setIdUsuarioUpdate(mixed $idUsuarioUpdate) : self
Parameters
- $idUsuarioUpdate : mixed
Return values
selfsetIdVariavelControle()
Set the value of idVariavelControle
public
setIdVariavelControle(mixed $idVariavelControle) : self
Parameters
- $idVariavelControle : mixed
Return values
selfsetStatus()
Set the value of status
public
setStatus(mixed $status) : self
Parameters
- $status : mixed
Return values
selfsetTotal()
Set the value of total
public
setTotal(mixed $total) : self
Parameters
- $total : mixed
Return values
selfsetTotalAnexo()
Set the value of totalAnexo
public
setTotalAnexo(mixed $totalAnexo) : self
Parameters
- $totalAnexo : mixed
Return values
selfupdate()
A função update pode atualizar uma Entity já instanciada, desde que a chave primária esteja setada, ou pode atualizar uma Entity vazia informando o valor da chave primária no segundo parâmetro (pk_value)
public
update(array<string|int, mixed> $values[, mixed $pk_value = null ]) : mixed
Parameters
- $values : array<string|int, mixed>
- $pk_value : mixed = null
validateFields()
public
validateFields([array<string|int, mixed> $fields = [] ]) : bool
Parameters
- $fields : array<string|int, mixed> = []
Return values
boolwhere()
Rudimentary ORM functions
public
static where([mixed $where = [] ][, mixed $select = '*' ]) : Collection
Parameters
- $where : mixed = []
- $select : mixed = '*'