A reply starts from a template filled in the language the person wrote in, is sent by the application when it has a mailer that delivers or handed to the replier's mail program otherwise, and is recorded on the submission. The same is available through the API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
703 B
PHP
32 lines
703 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* An answer given to a submission, kept so the next person to open it knows
|
|
* what was already said.
|
|
*/
|
|
#[Fillable(['user_id', 'user_name', 'subject', 'body', 'channel'])]
|
|
class ApplicationReply extends Model
|
|
{
|
|
public const UPDATED_AT = null;
|
|
|
|
public const MAIL = 'mail';
|
|
|
|
public const MAILTO = 'mailto';
|
|
|
|
/**
|
|
* @return BelongsTo<Application, $this>
|
|
*/
|
|
public function application(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Application::class);
|
|
}
|
|
}
|