kitsystemyou / character-manager-backend

0 stars 0 forks source link

ダメージボーナスが int で保存されてしまう #40

Closed kitsystemyou closed 1 year ago

kitsystemyou commented 1 year ago

ダメージボーナスは "1D4" とかなので文字列で保存する必要があるが数値型になっている

kitsystemyou commented 1 year ago

API と DB の変更が必要

kitsystemyou commented 1 year ago

ダメージボーナスの形式は {数字}d{数字}, max 10d6 min 0 でかつマイナスも存在するので符号最長5文字

kitsystemyou commented 1 year ago
mysql> desc coc_status_parameters;
+-------------------+----------+------+-----+---------+----------------+
| Field             | Type     | Null | Key | Default | Extra          |
+-------------------+----------+------+-----+---------+----------------+
| character_id      | int      | NO   | MUL | NULL    | auto_increment |
| str               | int      | YES  |     | NULL    |                |
| con               | int      | YES  |     | NULL    |                |
| pow               | int      | YES  |     | NULL    |                |
| dex               | int      | YES  |     | NULL    |                |
| app               | int      | YES  |     | NULL    |                |
| size              | int      | YES  |     | NULL    |                |
| inte              | int      | YES  |     | NULL    |                |
| edu               | int      | YES  |     | NULL    |                |
| hp                | int      | YES  |     | NULL    |                |
| mp                | int      | YES  |     | NULL    |                |
| init_san          | int      | YES  |     | NULL    |                |
| current_san       | int      | YES  |     | NULL    |                |
| idea              | int      | YES  |     | NULL    |                |
| knowledge         | int      | YES  |     | NULL    |                |
| damage_bonus      | char(20) | YES  |     | NULL    |                |
| luck              | int      | YES  |     | NULL    |                |
| max_job_point     | int      | YES  |     | NULL    |                |
| max_concern_point | int      | YES  |     | NULL    |                |
+-------------------+----------+------+-----+---------+----------------+
19 rows in set (0.00 sec)