DTO 追加
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
function
|
|
||||||
set_mysql ($db)
|
|
||||||
{
|
|
||||||
$url = 'localhost';
|
|
||||||
$user = 'root';
|
|
||||||
$pass = '';
|
|
||||||
|
|
||||||
return new mysqli ($url, $user, $pass, $db);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Dto;
|
||||||
|
|
||||||
|
|
||||||
|
class
|
||||||
|
Thread
|
||||||
|
{
|
||||||
|
public int $id;
|
||||||
|
public string $title;
|
||||||
|
public ?string $explain;
|
||||||
|
public bool $deleted;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user