Skip to content

ガチャイベントの期間変更コマンドを追加する #2351

@Lucky3028

Description

@Lucky3028

ガチャのイベントの期間は現在作成時に指定したらそれっきり変更ができないので、ゲーム内から変更できるようにする。

コマンドの構文
/gacha edit-event-date <イベント名> <開始日> <終了日>
※開始日、終了日の形式はyyyy-MM-dd

gacha_eventsテーブルのスキーマ

USE seichiassist;
CREATE TABLE IF NOT EXISTS gacha_events(
id INT AUTO_INCREMENT,
event_name VARCHAR(30),
event_start_time DATETIME,
event_end_time DATETIME,
PRIMARY KEY(id, event_name)
);

実装手順メモ

  1. ガチャイベントの期間を変更するメソッドの定義を以下に記載
    https://github.com/GiganticMinecraft/SeichiAssist/blob/develop/src/main/scala/com/github/unchama/seichiassist/subsystems/gachaprize/domain/gachaevent/GachaEventPersistence.scala
  2. そのメソッドの定義の実装(SQLクエリを実行して、イベントの期間を更新する)を以下に記載 https://github.com/GiganticMinecraft/SeichiAssist/blob/develop/src/main/scala/com/github/unchama/seichiassist/subsystems/gachaprize/infrastructure/JdbcGachaEventPersistence.scala
  3. 外部パッケージに公開するAPIである以下ファイルに、ガチャイベントの期間を変更するAPIがあることを定義
    https://github.com/GiganticMinecraft/SeichiAssist/blob/develop/src/main/scala/com/github/unchama/seichiassist/subsystems/gachaprize/GachaPrizeAPI.scala#L49-L62
  4. 2.で実装したメソッドと3.で定義したAPIを結びつける
    https://github.com/GiganticMinecraft/SeichiAssist/blob/develop/src/main/scala/com/github/unchama/seichiassist/subsystems/gachaprize/System.scala#L50-L88
  5. コマンドの定義を以下に記載(/gacha create-eventなどが参考になる)
    https://github.com/GiganticMinecraft/SeichiAssist/blob/develop/src/main/scala/com/github/unchama/seichiassist/subsystems/gacha/bukkit/GachaCommand.scala

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature新規機能に関するissueですgood first issue初めて開発に参加する方が取り組みやすいissueです

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions