Add SmsServiceLookupOnlyTest AST and migration for template_code in sms_logs
- Created a new AST JSON file for SmsServiceLookupOnlyTest.php, detailing nodes, edges, and raw calls for better code analysis. - Added a new migration (Version20260707202553) to alter the sms_logs table by adding a nullable template_code column.
This commit is contained in:
@@ -58,6 +58,10 @@ class SmsLog
|
||||
#[ORM\Column(name: 'template_uuid', type: 'string', length: 36, nullable: true)]
|
||||
private ?string $templateUuid = null;
|
||||
|
||||
// نام تمپلت VerifyLookup کاوهنگار که این پیامک با آن ارسال شده (مثلاً clinicpro-otp)؛ null اگر ارسال نشده.
|
||||
#[ORM\Column(name: 'template_code', type: 'string', length: 100, nullable: true)]
|
||||
private ?string $templateCode = null;
|
||||
|
||||
#[ORM\Column(type: 'string', length: 30, options: ['default' => self::TAG_GLOBAL])]
|
||||
private string $tag = self::TAG_GLOBAL;
|
||||
|
||||
@@ -76,6 +80,8 @@ class SmsLog
|
||||
}
|
||||
|
||||
public function setTemplateUuid(?string $v): self { $this->templateUuid = $v; return $this; }
|
||||
public function setTemplateCode(?string $v): self { $this->templateCode = $v; return $this; }
|
||||
public function getTemplateCode(): ?string { return $this->templateCode; }
|
||||
public function getTag(): string { return $this->tag; }
|
||||
public function setTag(string $v): self { $this->tag = $v; return $this; }
|
||||
|
||||
@@ -88,6 +94,7 @@ class SmsLog
|
||||
'provider' => $this->provider,
|
||||
'success' => $this->success,
|
||||
'template_uuid' => $this->templateUuid,
|
||||
'template_code' => $this->templateCode,
|
||||
'tag' => $this->tag,
|
||||
'created_at' => $this->createdAt,
|
||||
];
|
||||
|
||||
@@ -97,6 +97,7 @@ class SmsService
|
||||
|
||||
$log = new SmsLog($msg->mobile, $msg->message, $provider->getName(), $success, $msg->tag);
|
||||
if ($msg->templateUuid) $log->setTemplateUuid($msg->templateUuid);
|
||||
if ($msg->templateCode) $log->setTemplateCode($msg->templateCode);
|
||||
$this->logRepo->save($log);
|
||||
|
||||
return $success;
|
||||
|
||||
Reference in New Issue
Block a user