このコミットが含まれているのは:
守矢諏訪子 2022-01-08 18:07:41 +09:00
コミット ade9199d91
2個のファイルの変更3行の追加1行の削除

ファイルの表示

@ -8,5 +8,5 @@ use Illuminate\Database\Eloquent\Model;
class TelActivation extends Model
{
use HasFactory;
protected $fillable = ['type', 'child_id', 'tel', 'token', 'ttl'];
protected $fillable = ['type', 'child_id', 'father_id', 'tel', 'token', 'ttl'];
}

ファイルの表示

@ -18,6 +18,8 @@ class CreateTelActivationsTable extends Migration
$table->unsignedTinyInteger('type');
$table->unsignedBigInteger('child_id')->nullable();
$table->foreign('child_id')->references('id')->on('children')->onDelete('cascade');
$table->unsignedBigInteger('father_id')->nullable();
$table->foreign('father_id')->references('id')->on('fathers')->onDelete('cascade');
$table->string('tel', 11)->unique();
$table->string('token', 100)->unique();
$table->dateTime('ttl');