require "./setup"

User.delete_all
Wkbk.destroy_all
Wkbk.setup

user = User.admin
book = user.wkbk_books.create!(folder: user.wkbk_folder_for(:private))
article = user.wkbk_articles.create!(folder: user.wkbk_folder_for(:private))
book.articles << article

tp Wkbk::Folder
tp Wkbk::Book
tp Wkbk::Article

# >> |-----+---------+------------------+---------------------------+---------------------------|
# >> | id  | user_id | type             | created_at                | updated_at                |
# >> |-----+---------+------------------+---------------------------+---------------------------|
# >> |  99 |      50 | Wkbk::PrivateBox | 2021-01-25 13:07:04 +0900 | 2021-01-25 13:07:04 +0900 |
# >> | 100 |      50 | Wkbk::PublicBox  | 2021-01-25 13:07:04 +0900 | 2021-01-25 13:07:04 +0900 |
# >> |-----+---------+------------------+---------------------------+---------------------------|
# >> |----+----------------------------------+---------+-----------+-------+-------------+----------------+---------------------------+---------------------------+---------------+----------------|
# >> | id | key                              | user_id | folder_id | title | description | articles_count | created_at                | updated_at                | user_tag_list | owner_tag_list |
# >> |----+----------------------------------+---------+-----------+-------+-------------+----------------+---------------------------+---------------------------+---------------+----------------|
# >> | 44 | b89d5bbd46f9402eacff0d88175744d8 |      50 |        99 |       |             |              1 | 2021-01-25 13:07:04 +0900 | 2021-01-25 13:07:04 +0900 |               |                |
# >> |----+----------------------------------+---------+-----------+-------+-------------+----------------+---------------------------+---------------------------+---------------+----------------|
# >> |-----+----------------------------------+---------+-----------+------------+---------+-------------------------------------------------+----------------+------------------+----------------------------------+-------------+-----------+---------------+-------------------+------------------+---------------------+-----------------+----------+-----------+-------------------+---------------------------+---------------------------+---------------------+----------------------------+---------------+----------------|
# >> | id  | key                              | user_id | folder_id | lineage_id | book_id | init_sfen                                       | time_limit_sec | difficulty_level | title                            | description | hint_desc | source_author | source_media_name | source_media_url | source_published_on | source_about_id | turn_max | mate_skip | direction_message | created_at                | updated_at                | moves_answers_count | moves_answer_validate_skip | user_tag_list | owner_tag_list |
# >> |-----+----------------------------------+---------+-----------+------------+---------+-------------------------------------------------+----------------+------------------+----------------------------------+-------------+-----------+---------------+-------------------+------------------+---------------------+-----------------+----------+-----------+-------------------+---------------------------+---------------------------+---------------------+----------------------------+---------------+----------------|
# >> | 421 | de291377f1cac43827d80ad0991e163a |      50 |        99 |        393 |      44 | 7nl/7k1/9/7pp/6N2/9/9/9/9 b GS2r2b3g3s2n3l16p 1 |                |                  | 5cb5c142f60a4fffabf0b23c699dd179 |             |           |               |                   |                  |                     |               1 |          | false     |                   | 2021-01-25 13:07:04 +0900 | 2021-01-25 13:07:04 +0900 |                   0 |                            |               |                |
# >> |-----+----------------------------------+---------+-----------+------------+---------+-------------------------------------------------+----------------+------------------+----------------------------------+-------------+-----------+---------------+-------------------+------------------+---------------------+-----------------+----------+-----------+-------------------+---------------------------+---------------------------+---------------------+----------------------------+---------------+----------------|
