DTO 追加

This commit is contained in:
2024-02-07 03:42:00 +09:00
parent dca71147b4
commit 4b89165f8e
3 changed files with 37 additions and 12 deletions
-12
View File
@@ -1,12 +0,0 @@
<?php
function
set_mysql ($db)
{
$url = 'localhost';
$user = 'root';
$pass = '';
return new mysqli ($url, $user, $pass, $db);
}
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Dto;
class
Response
{
public int $thread_id;
public int $response_id;
public string $name;
public ?string $message;
public DateTime $date;
public string $image;
public bool $held;
public bool $deleted;
public ?string $pass;
public int $good;
public int $bad;
public Thread $thread;
}
+14
View File
@@ -0,0 +1,14 @@
<?php
namespace Dto;
class
Thread
{
public int $id;
public string $title;
public ?string $explain;
public bool $deleted;
}