Browse Source

DTO 追加

sqlite
みてるぞ 7 months ago
parent
commit
4b89165f8e
3 changed files with 37 additions and 12 deletions
  1. +0
    -12
      database.example.php
  2. +23
    -0
      dtos/response.php
  3. +14
    -0
      dtos/thread.php

+ 0
- 12
database.example.php View File

@@ -1,12 +0,0 @@
<?php

function
set_mysql ($db)
{
$url = 'localhost';
$user = 'root';
$pass = '';

return new mysqli ($url, $user, $pass, $db);
}


+ 23
- 0
dtos/response.php 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
- 0
dtos/thread.php View File

@@ -0,0 +1,14 @@
<?php

namespace Dto;


class
Thread
{
public int $id;
public string $title;
public ?string $explain;
public bool $deleted;
}


Loading…
Cancel
Save