✏️ 正在编辑: CorretorAssinaturaTermo.php
路径:
/srv/systems_dir/yuppiecred/application/models/CorretorAssinaturaTermo.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Model_CorretorAssinaturaTermo { /** @var Model_DbTable_CorretorAssinaturaTermo */ private $table; public function __construct() { $this->table = table('corretor-assinatura'); } /** * @param array $data * @return int */ public function save(array $data): int { if (!empty($data['id'])) { return $this->table->update($data, 'id = ' . $data['id']); } return $this->table->insert($data); } /** * @param int|null $corretor * @param string|null $uuid * @return array|object */ public function getByCorretorId(?int $corretor, ?string $uuid = null) { return $this->table->findByCorretorId($corretor, $uuid); } /** * @param int $termoId * @param int $corretor * @param string $email * @return mixed */ public function hasTermoEnviado(int $termoId, int $corretor, string $email): bool { return (bool) $this->table->findTermoEnviado($termoId, $corretor, $email); } /** * @param int $termoId * @return array */ public function getTermoEnviado(int $termoId, int $corretorId): array { return $this->table->findTermoEnviado($termoId, $corretorId); } /** * @param int $id * @return array */ public function getTermoAssinado(int $id): array { return $this->table->findTermoAssinado($id); } /** * @param array $data * @return int */ public function delete(string $uuid): int { return $this->table->delete(['uuid = ?' => $uuid]); } /** * @param int $corretor * @return array */ public function getTermosEnviados(int $corretor): array { return $this->table->findTermosEnviados($corretor); } }
💾 保存文件
← 返回文件管理器