diff --git a/database/factories/BacklogFactory.php b/database/factories/BacklogFactory.php index 28ec98c..bd3a450 100644 --- a/database/factories/BacklogFactory.php +++ b/database/factories/BacklogFactory.php @@ -1,9 +1,9 @@ uuid('id')->primary(); @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -110,31 +115,33 @@ public function up(): void $table->boolean('locked')->default(0); $table->boolean('pending')->default(0); $table->boolean('planned')->default(0); + $table->boolean('prioritized')->default(0); $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); $table->boolean('retired')->default(0); $table->boolean('resolved')->default(0); + $table->boolean('special')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_boards_table.php b/database/migrations/2020_01_02_100001_create_matrix_boards_table.php index a3c3c17..883da40 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_boards_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_boards_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -28,8 +32,8 @@ public function up(): void $table->uuid('modified_by_id')->nullable()->index(); $table->uuid('owned_by_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); - $table->string('board_type')->nullable()->index(); $table->uuid('backlog_id')->nullable()->index(); + $table->string('board_type')->nullable()->index(); $table->uuid('epic_id')->nullable()->index(); $table->uuid('flow_id')->nullable()->index(); $table->uuid('matrix_id')->nullable()->index(); @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -118,23 +123,23 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_epics_table.php b/database/migrations/2020_01_02_100001_create_matrix_epics_table.php index f250f19..1c0b96b 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_epics_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_epics_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -118,23 +123,23 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_flows_table.php b/database/migrations/2020_01_02_100001_create_matrix_flows_table.php index 19642fa..292766e 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_flows_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_flows_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -44,14 +48,8 @@ public function up(): void $table->dateTime('planned_start_at')->nullable(); $table->dateTime('end_at')->nullable()->index(); $table->dateTime('planned_end_at')->nullable(); - $table->dateTime('canceled_at')->nullable(); - $table->dateTime('closed_at')->nullable()->index(); $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); $table->dateTime('postponed_at')->nullable(); - $table->dateTime('published_at')->nullable(); - $table->dateTime('released_at')->nullable(); - $table->dateTime('resolved_at')->nullable(); $table->dateTime('resumed_at')->nullable(); $table->dateTime('suspended_at')->nullable(); @@ -78,52 +76,45 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags $table->boolean('active')->default(1)->index(); - $table->boolean('canceled')->default(0); - $table->boolean('closed')->default(0); - $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); - $table->boolean('fixed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); $table->boolean('pending')->default(0); $table->boolean('planned')->default(0); $table->boolean('problem')->default(0); - $table->boolean('published')->default(0); - $table->boolean('released')->default(0); $table->boolean('retired')->default(0); - $table->boolean('resolved')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON @@ -133,6 +124,10 @@ public function up(): void $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); + $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); + $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); + $table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())')); + $table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())')); }); } diff --git a/database/migrations/2020_01_02_100001_create_matrix_matrices_table.php b/database/migrations/2020_01_02_100001_create_matrix_matrices_table.php index a61f31d..c548447 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_matrices_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_matrices_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -27,9 +31,9 @@ public function up(): void $table->uuid('created_by_id')->nullable()->index(); $table->uuid('modified_by_id')->nullable()->index(); $table->uuid('owned_by_id')->nullable()->index(); - $table->uuid('matrix_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); $table->string('matrix_type')->nullable()->index(); + $table->uuid('matrix_id')->nullable()->index(); // Dates @@ -43,6 +47,8 @@ public function up(): void $table->dateTime('planned_end_at')->nullable(); $table->dateTime('canceled_at')->nullable(); $table->dateTime('closed_at')->nullable()->index(); + $table->dateTime('embargo_at')->nullable(); + $table->dateTime('postponed_at')->nullable(); $table->dateTime('resumed_at')->nullable(); $table->dateTime('suspended_at')->nullable(); @@ -69,19 +75,21 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags $table->boolean('active')->default(1)->index(); $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); + $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); @@ -92,23 +100,23 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_milestones_table.php b/database/migrations/2020_01_02_100001_create_matrix_milestones_table.php index f7542fa..a959018 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_milestones_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_milestones_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -62,8 +66,8 @@ public function up(): void $table->dateTime('postponed_at')->nullable(); $table->dateTime('published_at')->nullable(); $table->dateTime('released_at')->nullable(); - $table->dateTime('resumed_at')->nullable(); $table->dateTime('resolved_at')->nullable()->index(); + $table->dateTime('resumed_at')->nullable(); $table->dateTime('suspended_at')->nullable(); // Permissions @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -118,23 +123,23 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_notes_table.php b/database/migrations/2020_01_02_100001_create_matrix_notes_table.php index a560643..2bf60fa 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_notes_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_notes_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -30,6 +34,7 @@ public function up(): void $table->uuid('parent_id')->nullable()->index(); $table->string('note_type')->nullable()->index(); $table->uuid('matrix_id')->nullable()->index(); + $table->uuid('tag_id')->nullable()->index(); // Dates @@ -37,21 +42,6 @@ public function up(): void $table->softDeletes(); - $table->dateTime('start_at')->nullable()->index(); - $table->dateTime('planned_start_at')->nullable(); - $table->dateTime('end_at')->nullable()->index(); - $table->dateTime('planned_end_at')->nullable(); - $table->dateTime('canceled_at')->nullable(); - $table->dateTime('closed_at')->nullable()->index(); - $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); - $table->dateTime('postponed_at')->nullable(); - $table->dateTime('published_at')->nullable(); - $table->dateTime('released_at')->nullable(); - $table->dateTime('resumed_at')->nullable(); - $table->dateTime('resolved_at')->nullable()->index(); - $table->dateTime('suspended_at')->nullable(); - // Permissions $table->bigInteger('gids')->default(0)->unsigned(); @@ -75,13 +65,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -89,50 +79,39 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); - $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); $table->boolean('pending')->default(0); $table->boolean('planned')->default(0); $table->boolean('problem')->default(0); - $table->boolean('published')->default(0); - $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); - $table->boolean('resolved')->default(0); - $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON $table->json('assets')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('flow')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())')); }); } diff --git a/database/migrations/2020_01_02_100001_create_matrix_projects_table.php b/database/migrations/2020_01_02_100001_create_matrix_projects_table.php index 8902052..777ce3b 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_projects_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_projects_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -58,7 +62,6 @@ public function up(): void $table->dateTime('canceled_at')->nullable(); $table->dateTime('closed_at')->nullable()->index(); $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); $table->dateTime('postponed_at')->nullable(); $table->dateTime('published_at')->nullable(); $table->dateTime('released_at')->nullable(); @@ -89,13 +92,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,7 +106,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); @@ -118,25 +121,25 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - $table->string('key', 128)->default(''); - $table->string('code_name', 128)->default(''); + $table->string('key', 32)->nullable()->index(); + $table->string('code_name', 128)->nullable()->index(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON @@ -145,6 +148,7 @@ public function up(): void $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('flow')->nullable()->default(new Expression('(JSON_OBJECT())')); + $table->json('history')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); diff --git a/database/migrations/2020_01_02_100001_create_matrix_releases_table.php b/database/migrations/2020_01_02_100001_create_matrix_releases_table.php index c46da27..12bc7ec 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_releases_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_releases_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -62,8 +66,8 @@ public function up(): void $table->dateTime('postponed_at')->nullable(); $table->dateTime('published_at')->nullable(); $table->dateTime('released_at')->nullable(); + $table->dateTime('resolved_at')->nullable(); $table->dateTime('resumed_at')->nullable(); - $table->dateTime('resolved_at')->nullable()->index(); $table->dateTime('suspended_at')->nullable(); // Permissions @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,7 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); @@ -118,23 +122,23 @@ public function up(): void $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_roadmaps_table.php b/database/migrations/2020_01_02_100001_create_matrix_roadmaps_table.php index 8d342ba..f4aedb3 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_roadmaps_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_roadmaps_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -58,12 +62,10 @@ public function up(): void $table->dateTime('canceled_at')->nullable(); $table->dateTime('closed_at')->nullable()->index(); $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); $table->dateTime('postponed_at')->nullable(); $table->dateTime('published_at')->nullable(); $table->dateTime('released_at')->nullable(); $table->dateTime('resumed_at')->nullable(); - $table->dateTime('resolved_at')->nullable()->index(); $table->dateTime('suspended_at')->nullable(); // Permissions @@ -89,13 +91,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,8 +105,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); - $table->boolean('fixed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); @@ -113,28 +114,26 @@ public function up(): void $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); - $table->boolean('resolved')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_sources_table.php b/database/migrations/2020_01_02_100001_create_matrix_sources_table.php index 1fd31c4..c2282d0 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_sources_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_sources_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -29,21 +33,9 @@ public function up(): void $table->uuid('owned_by_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); $table->string('source_type')->nullable()->index(); - $table->uuid('backlog_id')->nullable()->index(); - $table->uuid('board_id')->nullable()->index(); - $table->uuid('epic_id')->nullable()->index(); - $table->uuid('flow_id')->nullable()->index(); $table->uuid('matrix_id')->nullable()->index(); - $table->uuid('milestone_id')->nullable()->index(); - $table->uuid('note_id')->nullable()->index(); - $table->uuid('project_id')->nullable()->index(); - $table->uuid('release_id')->nullable()->index(); - $table->uuid('roadmap_id')->nullable()->index(); - $table->uuid('sprint_id')->nullable()->index(); $table->uuid('tag_id')->nullable()->index(); $table->uuid('team_id')->nullable()->index(); - $table->uuid('ticket_id')->nullable()->index(); - $table->uuid('version_id')->nullable()->index(); // Dates @@ -89,13 +81,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +95,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -113,40 +106,36 @@ public function up(): void $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); $table->boolean('resolved')->default(0); + $table->boolean('retired')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON $table->json('assets')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('flow')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())')); }); } diff --git a/database/migrations/2020_01_02_100001_create_matrix_sprints_table.php b/database/migrations/2020_01_02_100001_create_matrix_sprints_table.php index b48645c..e365d22 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_sprints_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_sprints_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -89,13 +93,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,6 +107,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -113,28 +118,28 @@ public function up(): void $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); $table->boolean('resolved')->default(0); + $table->boolean('retired')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_tags_table.php b/database/migrations/2020_01_02_100001_create_matrix_tags_table.php index efd7bd6..b3caa09 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_tags_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_tags_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -29,21 +33,7 @@ public function up(): void $table->uuid('owned_by_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); $table->string('tag_type')->nullable()->index(); - $table->uuid('backlog_id')->nullable()->index(); - $table->uuid('board_id')->nullable()->index(); - $table->uuid('epic_id')->nullable()->index(); - $table->uuid('flow_id')->nullable()->index(); $table->uuid('matrix_id')->nullable()->index(); - $table->uuid('milestone_id')->nullable()->index(); - $table->uuid('note_id')->nullable()->index(); - $table->uuid('project_id')->nullable()->index(); - $table->uuid('release_id')->nullable()->index(); - $table->uuid('roadmap_id')->nullable()->index(); - $table->uuid('source_id')->nullable()->index(); - $table->uuid('sprint_id')->nullable()->index(); - $table->uuid('team_id')->nullable()->index(); - $table->uuid('ticket_id')->nullable()->index(); - $table->uuid('version_id')->nullable()->index(); // Dates @@ -51,21 +41,6 @@ public function up(): void $table->softDeletes(); - $table->dateTime('start_at')->nullable()->index(); - $table->dateTime('planned_start_at')->nullable(); - $table->dateTime('end_at')->nullable()->index(); - $table->dateTime('planned_end_at')->nullable(); - $table->dateTime('canceled_at')->nullable(); - $table->dateTime('closed_at')->nullable()->index(); - $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); - $table->dateTime('postponed_at')->nullable(); - $table->dateTime('published_at')->nullable(); - $table->dateTime('released_at')->nullable(); - $table->dateTime('resumed_at')->nullable(); - $table->dateTime('resolved_at')->nullable()->index(); - $table->dateTime('suspended_at')->nullable(); - // Permissions $table->bigInteger('gids')->default(0)->unsigned(); @@ -89,64 +64,48 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags $table->boolean('active')->default(1)->index(); - $table->boolean('canceled')->default(0); - $table->boolean('closed')->default(0); - $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); - $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); - $table->boolean('pending')->default(0); - $table->boolean('planned')->default(0); - $table->boolean('problem')->default(0); - $table->boolean('published')->default(0); - $table->boolean('released')->default(0); $table->boolean('retired')->default(0); - $table->boolean('resolved')->default(0); - $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON $table->json('assets')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('flow')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())')); }); } diff --git a/database/migrations/2020_01_02_100001_create_matrix_teams_table.php b/database/migrations/2020_01_02_100001_create_matrix_teams_table.php index 95682ce..7fe3c62 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_teams_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_teams_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -58,12 +62,8 @@ public function up(): void $table->dateTime('canceled_at')->nullable(); $table->dateTime('closed_at')->nullable()->index(); $table->dateTime('embargo_at')->nullable(); - $table->dateTime('fixed_at')->nullable(); $table->dateTime('postponed_at')->nullable(); - $table->dateTime('published_at')->nullable(); - $table->dateTime('released_at')->nullable(); $table->dateTime('resumed_at')->nullable(); - $table->dateTime('resolved_at')->nullable()->index(); $table->dateTime('suspended_at')->nullable(); // Permissions @@ -89,13 +89,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,38 +103,34 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); - $table->boolean('fixed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); $table->boolean('locked')->default(0); $table->boolean('pending')->default(0); $table->boolean('planned')->default(0); $table->boolean('problem')->default(0); - $table->boolean('published')->default(0); - $table->boolean('released')->default(0); $table->boolean('retired')->default(0); - $table->boolean('resolved')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_tickets_table.php b/database/migrations/2020_01_02_100001_create_matrix_tickets_table.php index 6064f6d..041301e 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_tickets_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_tickets_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -28,6 +32,7 @@ public function up(): void $table->uuid('modified_by_id')->nullable()->index(); $table->uuid('owned_by_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); + $table->string('ticket_type')->nullable()->index(); $table->uuid('duplicate_id')->nullable()->index(); $table->uuid('backlog_id')->nullable()->index(); $table->uuid('board_id')->nullable()->index(); @@ -48,7 +53,6 @@ public function up(): void $table->uuid('team_id')->nullable()->index(); $table->uuid('version_id')->nullable()->index(); $table->uuid('version_fixed_id')->nullable()->index(); - $table->string('ticket_type')->nullable()->index(); // Dates @@ -94,13 +98,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -108,6 +112,7 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); + $table->boolean('cron')->default(0)->index(); $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); @@ -115,29 +120,31 @@ public function up(): void $table->boolean('locked')->default(0); $table->boolean('pending')->default(0); $table->boolean('planned')->default(0); + $table->boolean('prioritized')->default(0); $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); $table->boolean('resolved')->default(0); + $table->boolean('retired')->default(0); + $table->boolean('special')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - $table->string('key')->default(''); $table->string('handler')->default(''); - $table->bigInteger('code')->default(0)->unsigned()->index(); - $table->string('key_code_hash')->default(''); + $table->string('key', 32)->nullable()->index(); + $table->bigInteger('code')->nullable()->unsigned()->index(); + $table->string('key_code_hash')->nullable(); $table->string('priority')->default(''); $table->string('severity')->default(''); $table->string('resolution')->default(''); @@ -150,13 +157,13 @@ public function up(): void $table->mediumText('story')->nullable(); $table->mediumText('steps')->nullable(); $table->mediumText('criteria')->nullable(); - $table->decimal('reproducibility', 8, 2)->nullable()->default(null); + $table->decimal('reproducibility', 8, 2)->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON diff --git a/database/migrations/2020_01_02_100001_create_matrix_versions_table.php b/database/migrations/2020_01_02_100001_create_matrix_versions_table.php index 03dffcc..502b576 100644 --- a/database/migrations/2020_01_02_100001_create_matrix_versions_table.php +++ b/database/migrations/2020_01_02_100001_create_matrix_versions_table.php @@ -1,15 +1,18 @@ uuid('id')->primary(); @@ -29,18 +33,10 @@ public function up(): void $table->uuid('owned_by_id')->nullable()->index(); $table->uuid('parent_id')->nullable()->index(); $table->string('version_type')->nullable()->index(); - $table->uuid('backlog_id')->nullable()->index(); - $table->uuid('board_id')->nullable()->index(); - $table->uuid('epic_id')->nullable()->index(); - $table->uuid('flow_id')->nullable()->index(); $table->uuid('matrix_id')->nullable()->index(); - $table->uuid('milestone_id')->nullable()->index(); - $table->uuid('note_id')->nullable()->index(); $table->uuid('project_id')->nullable()->index(); - $table->uuid('release_id')->nullable()->index(); $table->uuid('roadmap_id')->nullable()->index(); $table->uuid('source_id')->nullable()->index(); - $table->uuid('sprint_id')->nullable()->index(); $table->uuid('tag_id')->nullable()->index(); $table->uuid('team_id')->nullable()->index(); $table->uuid('ticket_id')->nullable()->index(); @@ -89,13 +85,13 @@ public function up(): void $table->bigInteger('x')->nullable(); $table->bigInteger('y')->nullable(); $table->bigInteger('z')->nullable(); - $table->decimal('r', 65, 10)->nullable()->default(null); - $table->decimal('theta', 10, 6)->nullable()->default(null); - $table->decimal('rho', 10, 6)->nullable()->default(null); - $table->decimal('phi', 10, 6)->nullable()->default(null); - $table->decimal('elevation', 65, 10)->nullable()->default(null); - $table->decimal('latitude', 8, 6)->nullable()->default(null); - $table->decimal('longitude', 9, 6)->nullable()->default(null); + $table->decimal('r', 65, 10)->nullable(); + $table->decimal('theta', 10, 6)->nullable(); + $table->decimal('rho', 10, 6)->nullable(); + $table->decimal('phi', 10, 6)->nullable(); + $table->decimal('elevation', 65, 10)->nullable(); + $table->decimal('latitude', 8, 6)->nullable(); + $table->decimal('longitude', 9, 6)->nullable(); // Flags @@ -103,7 +99,6 @@ public function up(): void $table->boolean('canceled')->default(0); $table->boolean('closed')->default(0); $table->boolean('completed')->default(0); - $table->boolean('duplicate')->default(0); $table->boolean('fixed')->default(0); $table->boolean('flagged')->default(0); $table->boolean('internal')->default(0); @@ -113,40 +108,36 @@ public function up(): void $table->boolean('problem')->default(0); $table->boolean('published')->default(0); $table->boolean('released')->default(0); - $table->boolean('retired')->default(0); $table->boolean('resolved')->default(0); + $table->boolean('retired')->default(0); $table->boolean('suspended')->default(0); $table->boolean('unknown')->default(0); - // Strings + // Columns - $table->string('label')->default(''); - $table->string('title')->default(''); - $table->string('byline')->default(''); - $table->string('slug')->nullable()->default(null)->index(); - $table->string('url')->default(''); - $table->string('description')->default(''); - $table->string('introduction')->default(''); + $table->string('label', 128)->default(''); + $table->string('title', 255)->default(''); + $table->string('byline', 255)->default(''); + $table->string('slug', 128)->nullable()->index(); + $table->string('url', 512)->default(''); + $table->string('description', 512)->default(''); + $table->string('introduction', 512)->default(''); $table->mediumText('content')->nullable(); $table->mediumText('summary')->nullable(); - // UI + // Ui - $table->string('icon')->default(''); - $table->string('image')->default(''); - $table->string('avatar')->default(''); + $table->string('icon', 128)->default(''); + $table->string('image', 512)->default(''); + $table->string('avatar', 512)->default(''); $table->json('ui')->nullable()->default(new Expression('(JSON_OBJECT())')); // JSON $table->json('assets')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('backlog')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('board')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('flow')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('meta')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('notes')->nullable()->default(new Expression('(JSON_ARRAY())'))->comment('Array of note objects'); $table->json('options')->nullable()->default(new Expression('(JSON_OBJECT())')); - $table->json('roadmap')->nullable()->default(new Expression('(JSON_OBJECT())')); $table->json('sources')->nullable()->default(new Expression('(JSON_OBJECT())')); }); } diff --git a/src/Models/Backlog.php b/src/Models/Backlog.php index b7a6924..9ffb370 100644 --- a/src/Models/Backlog.php +++ b/src/Models/Backlog.php @@ -1,16 +1,121 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -55,8 +161,8 @@ class Backlog extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +175,7 @@ class Backlog extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +190,7 @@ class Backlog extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -134,6 +241,7 @@ class Backlog extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -185,6 +293,7 @@ class Backlog extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -217,7 +326,6 @@ class Backlog extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -258,9 +366,7 @@ protected function casts(): array 'only_guest' => 'boolean', 'allow_public' => 'boolean', 'status' => 'integer', - 'rank' => 'integer', - 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -271,10 +377,13 @@ protected function casts(): array 'elevation' => 'float', 'latitude' => 'float', 'longitude' => 'float', + 'rank' => 'integer', + 'size' => 'integer', 'active' => 'boolean', 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -350,6 +459,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the backlog. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the backlog. */ @@ -481,4 +602,28 @@ public function version(): HasOne 'version_id' ); } + + /** + * The sprints of the backlog. + */ + public function sprints(): HasMany + { + return $this->hasMany( + Sprint::class, + 'backlog_id', + 'id' + ); + } + + /** + * The tickets of the backlog. + */ + public function tickets(): HasMany + { + return $this->hasMany( + Ticket::class, + 'backlog_id', + 'id' + ); + } } diff --git a/src/Models/Board.php b/src/Models/Board.php index ded648e..60a3568 100644 --- a/src/Models/Board.php +++ b/src/Models/Board.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -55,8 +158,8 @@ class Board extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +172,7 @@ class Board extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +187,7 @@ class Board extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -134,6 +238,7 @@ class Board extends Model 'backlog_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -185,6 +290,7 @@ class Board extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -217,7 +323,6 @@ class Board extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -260,7 +365,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +380,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -350,6 +456,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the board. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the board. */ @@ -362,6 +480,18 @@ public function milestone(): HasOne ); } + /** + * The note of the board. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the board. */ diff --git a/src/Models/Epic.php b/src/Models/Epic.php index 3a35b15..e73a50b 100644 --- a/src/Models/Epic.php +++ b/src/Models/Epic.php @@ -1,9 +1,9 @@ null, 'board_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -55,8 +158,8 @@ class Epic extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +172,7 @@ class Epic extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +187,7 @@ class Epic extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -134,6 +238,7 @@ class Epic extends Model 'backlog_id', 'board_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -185,6 +290,7 @@ class Epic extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -217,7 +323,6 @@ class Epic extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -260,7 +365,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +380,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -350,6 +456,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the epic. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the epic. */ @@ -362,6 +480,18 @@ public function milestone(): HasOne ); } + /** + * The note of the epic. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the epic. */ diff --git a/src/Models/Flow.php b/src/Models/Flow.php index 6010df5..f48c52f 100644 --- a/src/Models/Flow.php +++ b/src/Models/Flow.php @@ -1,9 +1,9 @@ null, 'parent_id' => null, 'flow_type' => null, + 'matrix_id' => null, 'note_id' => null, 'tag_id' => null, 'team_id' => null, @@ -37,14 +115,8 @@ class Flow extends Model 'planned_start_at' => null, 'end_at' => null, 'planned_end_at' => null, - 'canceled_at' => null, - 'closed_at' => null, 'embargo_at' => null, - 'fixed_at' => null, 'postponed_at' => null, - 'published_at' => null, - 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, 'suspended_at' => null, 'gids' => 0, @@ -58,7 +130,7 @@ class Flow extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -70,21 +142,14 @@ class Flow extends Model 'latitude' => null, 'longitude' => null, 'active' => true, - 'canceled' => false, - 'closed' => false, - 'completed' => false, - 'duplicate' => false, - 'fixed' => false, + 'cron' => false, 'flagged' => false, 'internal' => false, 'locked' => false, 'pending' => false, 'planned' => false, 'problem' => false, - 'published' => false, - 'released' => false, 'retired' => false, - 'resolved' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -101,10 +166,14 @@ class Flow extends Model 'avatar' => '', 'ui' => '{}', 'assets' => '{}', + 'backlog' => '{}', + 'board' => '{}', 'flow' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', + 'roadmap' => '{}', + 'sources' => '{}', ]; /** @@ -116,6 +185,7 @@ class Flow extends Model 'owned_by_id', 'parent_id', 'flow_type', + 'matrix_id', 'note_id', 'tag_id', 'team_id', @@ -123,15 +193,9 @@ class Flow extends Model 'planned_start_at', 'end_at', 'planned_end_at', - 'canceled_at', - 'closed_at', 'embargo_at', - 'fixed_at', 'postponed_at', - 'published_at', - 'released_at', 'resumed_at', - 'resolved_at', 'suspended_at', 'gids', 'po', @@ -156,21 +220,14 @@ class Flow extends Model 'latitude', 'longitude', 'active', - 'canceled', - 'closed', - 'completed', - 'duplicate', - 'fixed', + 'cron', 'flagged', 'internal', 'locked', 'pending', 'planned', 'problem', - 'published', - 'released', 'retired', - 'resolved', 'suspended', 'unknown', 'label', @@ -187,10 +244,13 @@ class Flow extends Model 'avatar', 'ui', 'assets', + 'backlog', + 'board', 'flow', 'meta', - 'notes', 'options', + 'roadmap', + 'sources', ]; /** @@ -209,15 +269,9 @@ protected function casts(): array 'planned_start_at' => 'datetime', 'end_at' => 'datetime', 'planned_end_at' => 'datetime', - 'canceled_at' => 'datetime', - 'closed_at' => 'datetime', 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', 'postponed_at' => 'datetime', - 'published_at' => 'datetime', - 'released_at' => 'datetime', 'resumed_at' => 'datetime', - 'resolved_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -230,7 +284,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -242,21 +296,14 @@ protected function casts(): array 'latitude' => 'float', 'longitude' => 'float', 'active' => 'boolean', - 'canceled' => 'boolean', - 'closed' => 'boolean', - 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', + 'cron' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', 'pending' => 'boolean', 'planned' => 'boolean', 'problem' => 'boolean', - 'published' => 'boolean', - 'released' => 'boolean', 'retired' => 'boolean', - 'resolved' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -273,6 +320,8 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', + 'backlog' => 'array', + 'board' => 'array', 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', @@ -282,6 +331,18 @@ protected function casts(): array ]; } + /** + * The matrix of the flow. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The note of the flow. */ diff --git a/src/Models/Matrix.php b/src/Models/Matrix.php index a29d371..dc17bbe 100644 --- a/src/Models/Matrix.php +++ b/src/Models/Matrix.php @@ -1,15 +1,91 @@ null, 'parent_id' => null, 'matrix_type' => null, + 'matrix_id' => null, 'created_at' => null, 'updated_at' => null, 'deleted_at' => null, @@ -35,6 +112,8 @@ class Matrix extends Model 'planned_end_at' => null, 'canceled_at' => null, 'closed_at' => null, + 'embargo_at' => null, + 'postponed_at' => null, 'resumed_at' => null, 'suspended_at' => null, 'gids' => 0, @@ -48,7 +127,7 @@ class Matrix extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -62,6 +141,8 @@ class Matrix extends Model 'active' => true, 'canceled' => false, 'closed' => false, + 'completed' => false, + 'cron' => false, 'flagged' => false, 'internal' => false, 'locked' => false, @@ -100,12 +181,15 @@ class Matrix extends Model 'owned_by_id', 'parent_id', 'matrix_type', + 'matrix_id', 'start_at', 'planned_start_at', 'end_at', 'planned_end_at', 'canceled_at', 'closed_at', + 'embargo_at', + 'postponed_at', 'resumed_at', 'suspended_at', 'gids', @@ -133,6 +217,8 @@ class Matrix extends Model 'active', 'canceled', 'closed', + 'completed', + 'cron', 'flagged', 'internal', 'locked', @@ -157,7 +243,6 @@ class Matrix extends Model 'ui', 'assets', 'meta', - 'notes', 'options', 'sources', ]; @@ -180,6 +265,8 @@ protected function casts(): array 'planned_end_at' => 'datetime', 'canceled_at' => 'datetime', 'closed_at' => 'datetime', + 'embargo_at' => 'datetime', + 'postponed_at' => 'datetime', 'resumed_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', @@ -193,7 +280,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -207,6 +294,8 @@ protected function casts(): array 'active' => 'boolean', 'canceled' => 'boolean', 'closed' => 'boolean', + 'completed' => 'boolean', + 'cron' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', @@ -230,9 +319,6 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', - 'backlog' => 'array', - 'board' => 'array', - 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', @@ -240,4 +326,16 @@ protected function casts(): array 'sources' => 'array', ]; } + + /** + * The matrix of the matrix. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } } diff --git a/src/Models/Milestone.php b/src/Models/Milestone.php index eacebe5..cd55dc5 100644 --- a/src/Models/Milestone.php +++ b/src/Models/Milestone.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'note_id' => null, 'project_id' => null, 'release_id' => null, @@ -69,7 +172,7 @@ class Milestone extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +187,7 @@ class Milestone extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -135,6 +239,7 @@ class Milestone extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'note_id', 'project_id', 'release_id', @@ -156,8 +261,8 @@ class Milestone extends Model 'postponed_at', 'published_at', 'released_at', - 'resumed_at', 'resolved_at', + 'resumed_at', 'suspended_at', 'gids', 'po', @@ -185,6 +290,7 @@ class Milestone extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -217,7 +323,6 @@ class Milestone extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -241,13 +346,13 @@ protected function casts(): array 'planned_end_at' => 'datetime', 'canceled_at' => 'datetime', 'closed_at' => 'datetime', - 'embargo_at' => 'datetime', 'fixed_at' => 'datetime', + 'embargo_at' => 'datetime', 'postponed_at' => 'datetime', 'published_at' => 'datetime', 'released_at' => 'datetime', - 'resumed_at' => 'datetime', 'resolved_at' => 'datetime', + 'resumed_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -260,7 +365,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +380,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -362,6 +468,30 @@ public function flow(): HasOne ); } + /** + * The matrix of the milestone. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + + /** + * The note of the milestone. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the milestone. */ diff --git a/src/Models/Note.php b/src/Models/Note.php index 75a801d..66d5d67 100644 --- a/src/Models/Note.php +++ b/src/Models/Note.php @@ -1,15 +1,79 @@ null, 'parent_id' => null, 'note_type' => null, + 'matrix_id' => null, + 'tag_id' => null, 'created_at' => null, 'updated_at' => null, 'deleted_at' => null, - 'start_at' => null, - 'planned_start_at' => null, - 'end_at' => null, - 'planned_end_at' => null, - 'canceled_at' => null, - 'closed_at' => null, - 'embargo_at' => null, - 'fixed_at' => null, - 'postponed_at' => null, - 'published_at' => null, - 'released_at' => null, - 'resolved_at' => null, - 'resumed_at' => null, - 'suspended_at' => null, 'gids' => 0, 'po' => 0, 'pg' => 0, @@ -54,7 +106,7 @@ class Note extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -69,19 +121,12 @@ class Note extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, - 'fixed' => false, 'flagged' => false, 'internal' => false, 'locked' => false, 'pending' => false, 'planned' => false, 'problem' => false, - 'published' => false, - 'released' => false, - 'retired' => false, - 'resolved' => false, - 'suspended' => false, 'unknown' => false, 'label' => '', 'title' => '', @@ -97,13 +142,9 @@ class Note extends Model 'avatar' => '', 'ui' => '{}', 'assets' => '{}', - 'backlog' => '{}', - 'board' => '{}', - 'flow' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', - 'roadmap' => '{}', 'sources' => '{}', ]; @@ -116,20 +157,8 @@ class Note extends Model 'owned_by_id', 'parent_id', 'note_type', - 'start_at', - 'planned_start_at', - 'end_at', - 'planned_end_at', - 'canceled_at', - 'closed_at', - 'embargo_at', - 'fixed_at', - 'postponed_at', - 'published_at', - 'released_at', - 'resumed_at', - 'resolved_at', - 'suspended_at', + 'matrix_id', + 'tag_id', 'gids', 'po', 'pg', @@ -156,19 +185,12 @@ class Note extends Model 'canceled', 'closed', 'completed', - 'duplicate', - 'fixed', 'flagged', 'internal', 'locked', 'pending', 'planned', 'problem', - 'published', - 'released', - 'retired', - 'resolved', - 'suspended', 'unknown', 'label', 'title', @@ -184,13 +206,8 @@ class Note extends Model 'avatar', 'ui', 'assets', - 'backlog', - 'board', - 'flow', 'meta', - 'notes', 'options', - 'roadmap', 'sources', ]; @@ -206,20 +223,6 @@ protected function casts(): array 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', - 'start_at' => 'datetime', - 'planned_start_at' => 'datetime', - 'end_at' => 'datetime', - 'planned_end_at' => 'datetime', - 'canceled_at' => 'datetime', - 'closed_at' => 'datetime', - 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', - 'postponed_at' => 'datetime', - 'published_at' => 'datetime', - 'released_at' => 'datetime', - 'resumed_at' => 'datetime', - 'resolved_at' => 'datetime', - 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', 'pg' => 'integer', @@ -231,7 +234,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -246,19 +249,12 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', 'pending' => 'boolean', 'planned' => 'boolean', 'problem' => 'boolean', - 'published' => 'boolean', - 'released' => 'boolean', - 'retired' => 'boolean', - 'resolved' => 'boolean', - 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', 'title' => 'string', @@ -274,14 +270,34 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', - 'backlog' => 'array', - 'board' => 'array', - 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', - 'roadmap' => 'array', 'sources' => 'array', ]; } + + /** + * The matrix of the note. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + + /** + * The tag of the note. + */ + public function tag(): HasOne + { + return $this->hasOne( + Tag::class, + 'id', + 'tag_id' + ); + } } diff --git a/src/Models/Project.php b/src/Models/Project.php index 516ab9f..4765092 100644 --- a/src/Models/Project.php +++ b/src/Models/Project.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'release_id' => null, @@ -51,7 +155,6 @@ class Project extends Model 'canceled_at' => null, 'closed_at' => null, 'embargo_at' => null, - 'fixed_at' => null, 'postponed_at' => null, 'published_at' => null, 'released_at' => null, @@ -69,7 +172,7 @@ class Project extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,7 +187,7 @@ class Project extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, + 'cron' => false, 'fixed' => false, 'flagged' => false, 'internal' => false, @@ -94,8 +197,8 @@ class Project extends Model 'problem' => false, 'published' => false, 'released' => false, - 'retired' => false, 'resolved' => false, + 'retired' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -107,6 +210,8 @@ class Project extends Model 'introduction' => '', 'content' => null, 'summary' => null, + 'key' => null, + 'code_name' => null, 'icon' => '', 'image' => '', 'avatar' => '', @@ -115,6 +220,7 @@ class Project extends Model 'backlog' => '{}', 'board' => '{}', 'flow' => '{}', + 'history' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', @@ -135,6 +241,7 @@ class Project extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'release_id', @@ -152,12 +259,11 @@ class Project extends Model 'canceled_at', 'closed_at', 'embargo_at', - 'fixed_at', 'postponed_at', 'published_at', 'released_at', - 'resumed_at', 'resolved_at', + 'resumed_at', 'suspended_at', 'gids', 'po', @@ -185,8 +291,7 @@ class Project extends Model 'canceled', 'closed', 'completed', - 'duplicate', - 'fixed', + 'cron', 'flagged', 'internal', 'locked', @@ -195,8 +300,8 @@ class Project extends Model 'problem', 'published', 'released', - 'retired', 'resolved', + 'retired', 'suspended', 'unknown', 'label', @@ -208,6 +313,8 @@ class Project extends Model 'introduction', 'content', 'summary', + 'key', + 'code_name', 'icon', 'image', 'avatar', @@ -216,8 +323,8 @@ class Project extends Model 'backlog', 'board', 'flow', + 'history', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -242,12 +349,11 @@ protected function casts(): array 'canceled_at' => 'datetime', 'closed_at' => 'datetime', 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', 'postponed_at' => 'datetime', 'published_at' => 'datetime', 'released_at' => 'datetime', - 'resumed_at' => 'datetime', 'resolved_at' => 'datetime', + 'resumed_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -260,7 +366,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,7 +381,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', - 'duplicate' => 'boolean', + 'cron' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', @@ -285,8 +391,8 @@ protected function casts(): array 'problem' => 'boolean', 'published' => 'boolean', 'released' => 'boolean', - 'retired' => 'boolean', 'resolved' => 'boolean', + 'retired' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -298,6 +404,8 @@ protected function casts(): array 'introduction' => 'string', 'content' => 'string', 'summary' => 'string', + 'key' => 'string', + 'code_name' => 'string', 'icon' => 'string', 'image' => 'string', 'avatar' => 'string', @@ -306,6 +414,7 @@ protected function casts(): array 'backlog' => 'array', 'board' => 'array', 'flow' => 'array', + 'history' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', @@ -362,6 +471,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the project. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the project. */ @@ -374,6 +495,18 @@ public function milestone(): HasOne ); } + /** + * The note of the project. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The release of the project. */ diff --git a/src/Models/Release.php b/src/Models/Release.php index 816434a..e913522 100644 --- a/src/Models/Release.php +++ b/src/Models/Release.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -69,7 +171,7 @@ class Release extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,9 +186,9 @@ class Release extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, - 'fixed' => false, + 'cron' => false, 'flagged' => false, + 'fixed' => false, 'internal' => false, 'locked' => false, 'pending' => false, @@ -94,8 +196,8 @@ class Release extends Model 'problem' => false, 'published' => false, 'released' => false, - 'retired' => false, 'resolved' => false, + 'retired' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -135,6 +237,7 @@ class Release extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -156,8 +259,8 @@ class Release extends Model 'postponed_at', 'published_at', 'released_at', - 'resumed_at', 'resolved_at', + 'resumed_at', 'suspended_at', 'gids', 'po', @@ -185,9 +288,9 @@ class Release extends Model 'canceled', 'closed', 'completed', - 'duplicate', - 'fixed', + 'cron', 'flagged', + 'fixed', 'internal', 'locked', 'pending', @@ -196,7 +299,6 @@ class Release extends Model 'published', 'released', 'retired', - 'resolved', 'suspended', 'unknown', 'label', @@ -217,7 +319,6 @@ class Release extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -246,8 +347,8 @@ protected function casts(): array 'postponed_at' => 'datetime', 'published_at' => 'datetime', 'released_at' => 'datetime', - 'resumed_at' => 'datetime', 'resolved_at' => 'datetime', + 'resumed_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -260,7 +361,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,9 +376,9 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', + 'cron' => 'boolean', 'flagged' => 'boolean', + 'fixed' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', 'pending' => 'boolean', @@ -285,8 +386,8 @@ protected function casts(): array 'problem' => 'boolean', 'published' => 'boolean', 'released' => 'boolean', - 'retired' => 'boolean', 'resolved' => 'boolean', + 'retired' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -362,6 +463,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the release. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the release. */ @@ -374,6 +487,18 @@ public function milestone(): HasOne ); } + /** + * The note of the release. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the release. */ diff --git a/src/Models/Roadmap.php b/src/Models/Roadmap.php index 8c15caa..f0558f1 100644 --- a/src/Models/Roadmap.php +++ b/src/Models/Roadmap.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -51,11 +148,9 @@ class Roadmap extends Model 'canceled_at' => null, 'closed_at' => null, 'embargo_at' => null, - 'fixed_at' => null, 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, 'suspended_at' => null, 'gids' => 0, @@ -69,7 +164,7 @@ class Roadmap extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,8 +179,7 @@ class Roadmap extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, - 'fixed' => false, + 'cron' => false, 'flagged' => false, 'internal' => false, 'locked' => false, @@ -94,8 +188,6 @@ class Roadmap extends Model 'problem' => false, 'published' => false, 'released' => false, - 'retired' => false, - 'resolved' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -135,6 +227,7 @@ class Roadmap extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -152,12 +245,10 @@ class Roadmap extends Model 'canceled_at', 'closed_at', 'embargo_at', - 'fixed_at', 'postponed_at', 'published_at', 'released_at', 'resumed_at', - 'resolved_at', 'suspended_at', 'gids', 'po', @@ -185,8 +276,7 @@ class Roadmap extends Model 'canceled', 'closed', 'completed', - 'duplicate', - 'fixed', + 'cron', 'flagged', 'internal', 'locked', @@ -195,8 +285,6 @@ class Roadmap extends Model 'problem', 'published', 'released', - 'retired', - 'resolved', 'suspended', 'unknown', 'label', @@ -217,7 +305,6 @@ class Roadmap extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -242,12 +329,10 @@ protected function casts(): array 'canceled_at' => 'datetime', 'closed_at' => 'datetime', 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', 'postponed_at' => 'datetime', 'published_at' => 'datetime', 'released_at' => 'datetime', 'resumed_at' => 'datetime', - 'resolved_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -260,7 +345,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,8 +360,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', + 'cron' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', @@ -285,8 +369,6 @@ protected function casts(): array 'problem' => 'boolean', 'published' => 'boolean', 'released' => 'boolean', - 'retired' => 'boolean', - 'resolved' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -362,6 +444,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the roadmap. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the roadmap. */ @@ -374,6 +468,18 @@ public function milestone(): HasOne ); } + /** + * The note of the roadmap. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the roadmap. */ diff --git a/src/Models/Source.php b/src/Models/Source.php index 77b49da..d0e85c5 100644 --- a/src/Models/Source.php +++ b/src/Models/Source.php @@ -1,9 +1,9 @@ null, 'parent_id' => null, 'source_type' => null, - 'backlog_id' => null, - 'board_id' => null, - 'epic_id' => null, - 'flow_id' => null, - 'milestone_id' => null, - 'note_id' => null, - 'project_id' => null, - 'release_id' => null, - 'roadmap_id' => null, - 'sprint_id' => null, + 'matrix_id' => null, 'tag_id' => null, 'team_id' => null, - 'ticket_id' => null, - 'version_id' => null, 'created_at' => null, 'updated_at' => null, 'deleted_at' => null, @@ -55,8 +130,8 @@ class Source extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +144,7 @@ class Source extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +159,7 @@ class Source extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -112,13 +188,9 @@ class Source extends Model 'avatar' => '', 'ui' => '{}', 'assets' => '{}', - 'backlog' => '{}', - 'board' => '{}', - 'flow' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', - 'roadmap' => '{}', 'sources' => '{}', ]; @@ -131,20 +203,9 @@ class Source extends Model 'owned_by_id', 'parent_id', 'source_type', - 'backlog_id', - 'board_id', - 'epic_id', - 'flow_id', - 'milestone_id', - 'note_id', - 'project_id', - 'release_id', - 'roadmap_id', - 'sprint_id', + 'matrix_id', 'tag_id', 'team_id', - 'ticket_id', - 'version_id', 'start_at', 'planned_start_at', 'end_at', @@ -185,6 +246,7 @@ class Source extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -195,8 +257,8 @@ class Source extends Model 'problem', 'published', 'released', - 'retired', 'resolved', + 'retired', 'suspended', 'unknown', 'label', @@ -213,13 +275,8 @@ class Source extends Model 'avatar', 'ui', 'assets', - 'backlog', - 'board', - 'flow', 'meta', - 'notes', 'options', - 'roadmap', 'sources', ]; @@ -260,7 +317,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +332,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -285,8 +343,8 @@ protected function casts(): array 'problem' => 'boolean', 'published' => 'boolean', 'released' => 'boolean', - 'retired' => 'boolean', 'resolved' => 'boolean', + 'retired' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -303,122 +361,22 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', - 'backlog' => 'array', - 'board' => 'array', - 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', - 'roadmap' => 'array', 'sources' => 'array', ]; } /** - * The backlog of the source. - */ - public function backlog(): HasOne - { - return $this->hasOne( - Backlog::class, - 'id', - 'backlog_id' - ); - } - - /** - * The board of the source. - */ - public function board(): HasOne - { - return $this->hasOne( - Board::class, - 'id', - 'board_id' - ); - } - - /** - * The epic of the source. - */ - public function epic(): HasOne - { - return $this->hasOne( - Epic::class, - 'id', - 'epic_id' - ); - } - - /** - * The flow of the source. - */ - public function flow(): HasOne - { - return $this->hasOne( - Flow::class, - 'id', - 'flow_id' - ); - } - - /** - * The milestone of the source. - */ - public function milestone(): HasOne - { - return $this->hasOne( - Milestone::class, - 'id', - 'milestone_id' - ); - } - - /** - * The project of the source. + * The matrix of the source. */ - public function project(): HasOne + public function matrix(): HasOne { return $this->hasOne( - Project::class, + Matrix::class, 'id', - 'project_id' - ); - } - - /** - * The release of the source. - */ - public function release(): HasOne - { - return $this->hasOne( - Release::class, - 'id', - 'release_id' - ); - } - - /** - * The roadmap of the source. - */ - public function roadmap(): HasOne - { - return $this->hasOne( - Roadmap::class, - 'id', - 'roadmap_id' - ); - } - - /** - * The sprint of the source. - */ - public function sprint(): HasOne - { - return $this->hasOne( - Sprint::class, - 'id', - 'sprint_id' + 'matrix_id' ); } @@ -445,28 +403,4 @@ public function team(): HasOne 'team_id' ); } - - /** - * The ticket of the source. - */ - public function ticket(): HasOne - { - return $this->hasOne( - Ticket::class, - 'id', - 'ticket_id' - ); - } - - /** - * The version of the source. - */ - public function version(): HasOne - { - return $this->hasOne( - Version::class, - 'id', - 'version_id' - ); - } } diff --git a/src/Models/Sprint.php b/src/Models/Sprint.php index 3f833fa..a661c0b 100644 --- a/src/Models/Sprint.php +++ b/src/Models/Sprint.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -55,8 +158,8 @@ class Sprint extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +172,7 @@ class Sprint extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,6 +187,7 @@ class Sprint extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -135,6 +239,7 @@ class Sprint extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -185,6 +290,7 @@ class Sprint extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -217,7 +323,6 @@ class Sprint extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -260,7 +365,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +380,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -362,6 +468,30 @@ public function flow(): HasOne ); } + /** + * The matrix of the sprint. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + + /** + * The note of the sprint. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The milestone of the sprint. */ diff --git a/src/Models/Tag.php b/src/Models/Tag.php index 8aa7f4c..47e3409 100644 --- a/src/Models/Tag.php +++ b/src/Models/Tag.php @@ -1,9 +1,9 @@ null, 'parent_id' => null, 'tag_type' => null, - 'backlog_id' => null, - 'board_id' => null, - 'epic_id' => null, - 'flow_id' => null, - 'milestone_id' => null, - 'note_id' => null, - 'project_id' => null, - 'release_id' => null, - 'roadmap_id' => null, - 'source_id' => null, - 'sprint_id' => null, - 'team_id' => null, - 'ticket_id' => null, - 'version_id' => null, + 'matrix_id' => null, 'created_at' => null, 'updated_at' => null, 'deleted_at' => null, - 'start_at' => null, - 'planned_start_at' => null, - 'end_at' => null, - 'planned_end_at' => null, - 'canceled_at' => null, - 'closed_at' => null, - 'embargo_at' => null, - 'fixed_at' => null, - 'postponed_at' => null, - 'published_at' => null, - 'released_at' => null, - 'resolved_at' => null, - 'resumed_at' => null, - 'suspended_at' => null, 'gids' => 0, 'po' => 0, 'pg' => 0, @@ -69,7 +99,7 @@ class Tag extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -81,22 +111,10 @@ class Tag extends Model 'latitude' => null, 'longitude' => null, 'active' => true, - 'canceled' => false, - 'closed' => false, - 'completed' => false, - 'duplicate' => false, - 'fixed' => false, 'flagged' => false, 'internal' => false, 'locked' => false, - 'pending' => false, - 'planned' => false, - 'problem' => false, - 'published' => false, - 'released' => false, 'retired' => false, - 'resolved' => false, - 'suspended' => false, 'unknown' => false, 'label' => '', 'title' => '', @@ -112,13 +130,9 @@ class Tag extends Model 'avatar' => '', 'ui' => '{}', 'assets' => '{}', - 'backlog' => '{}', - 'board' => '{}', - 'flow' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', - 'roadmap' => '{}', 'sources' => '{}', ]; @@ -131,34 +145,7 @@ class Tag extends Model 'owned_by_id', 'parent_id', 'tag_type', - 'backlog_id', - 'board_id', - 'epic_id', - 'flow_id', - 'milestone_id', - 'note_id', - 'project_id', - 'release_id', - 'roadmap_id', - 'source_id', - 'sprint_id', - 'team_id', - 'ticket_id', - 'version_id', - 'start_at', - 'planned_start_at', - 'end_at', - 'planned_end_at', - 'canceled_at', - 'closed_at', - 'embargo_at', - 'fixed_at', - 'postponed_at', - 'published_at', - 'released_at', - 'resumed_at', - 'resolved_at', - 'suspended_at', + 'matrix_id', 'gids', 'po', 'pg', @@ -182,22 +169,10 @@ class Tag extends Model 'latitude', 'longitude', 'active', - 'canceled', - 'closed', - 'completed', - 'duplicate', - 'fixed', 'flagged', 'internal', 'locked', - 'pending', - 'planned', - 'problem', - 'published', - 'released', 'retired', - 'resolved', - 'suspended', 'unknown', 'label', 'title', @@ -213,13 +188,8 @@ class Tag extends Model 'avatar', 'ui', 'assets', - 'backlog', - 'board', - 'flow', 'meta', - 'notes', 'options', - 'roadmap', 'sources', ]; @@ -235,20 +205,6 @@ protected function casts(): array 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', - 'start_at' => 'datetime', - 'planned_start_at' => 'datetime', - 'end_at' => 'datetime', - 'planned_end_at' => 'datetime', - 'canceled_at' => 'datetime', - 'closed_at' => 'datetime', - 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', - 'postponed_at' => 'datetime', - 'published_at' => 'datetime', - 'released_at' => 'datetime', - 'resumed_at' => 'datetime', - 'resolved_at' => 'datetime', - 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', 'pg' => 'integer', @@ -260,7 +216,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -272,22 +228,10 @@ protected function casts(): array 'latitude' => 'float', 'longitude' => 'float', 'active' => 'boolean', - 'canceled' => 'boolean', - 'closed' => 'boolean', - 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', - 'pending' => 'boolean', - 'planned' => 'boolean', - 'problem' => 'boolean', - 'published' => 'boolean', - 'released' => 'boolean', 'retired' => 'boolean', - 'resolved' => 'boolean', - 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', 'title' => 'string', @@ -303,170 +247,22 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', - 'backlog' => 'array', - 'board' => 'array', - 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', - 'roadmap' => 'array', 'sources' => 'array', ]; } /** - * The backlog of the tag. - */ - public function backlog(): HasOne - { - return $this->hasOne( - Backlog::class, - 'id', - 'backlog_id' - ); - } - - /** - * The board of the tag. - */ - public function board(): HasOne - { - return $this->hasOne( - Board::class, - 'id', - 'board_id' - ); - } - - /** - * The epic of the tag. - */ - public function epic(): HasOne - { - return $this->hasOne( - Epic::class, - 'id', - 'epic_id' - ); - } - - /** - * The flow of the tag. - */ - public function flow(): HasOne - { - return $this->hasOne( - Flow::class, - 'id', - 'flow_id' - ); - } - - /** - * The milestone of the tag. - */ - public function milestone(): HasOne - { - return $this->hasOne( - Milestone::class, - 'id', - 'milestone_id' - ); - } - - /** - * The project of the tag. - */ - public function project(): HasOne - { - return $this->hasOne( - Project::class, - 'id', - 'project_id' - ); - } - - /** - * The release of the tag. - */ - public function release(): HasOne - { - return $this->hasOne( - Release::class, - 'id', - 'release_id' - ); - } - - /** - * The roadmap of the tag. - */ - public function roadmap(): HasOne - { - return $this->hasOne( - Roadmap::class, - 'id', - 'roadmap_id' - ); - } - - /** - * The source of the tag. - */ - public function source(): HasOne - { - return $this->hasOne( - Source::class, - 'id', - 'source_id' - ); - } - - /** - * The sprint of the tag. - */ - public function sprint(): HasOne - { - return $this->hasOne( - Sprint::class, - 'id', - 'sprint_id' - ); - } - - /** - * The team of the tag. - */ - public function team(): HasOne - { - return $this->hasOne( - Team::class, - 'id', - 'team_id' - ); - } - - /** - * The ticket of the tag. - */ - public function ticket(): HasOne - { - return $this->hasOne( - Ticket::class, - 'id', - 'ticket_id' - ); - } - - /** - * The version of the tag. + * The matrix of the tag. */ - public function version(): HasOne + public function matrix(): HasOne { return $this->hasOne( - Version::class, + Matrix::class, 'id', - 'version_id' + 'matrix_id' ); } } diff --git a/src/Models/Team.php b/src/Models/Team.php index a64abe3..b110617 100644 --- a/src/Models/Team.php +++ b/src/Models/Team.php @@ -1,9 +1,9 @@ null, 'epic_id' => null, 'flow_id' => null, + 'matrix_id' => null, 'milestone_id' => null, 'note_id' => null, 'project_id' => null, @@ -51,11 +145,7 @@ class Team extends Model 'canceled_at' => null, 'closed_at' => null, 'embargo_at' => null, - 'fixed_at' => null, 'postponed_at' => null, - 'published_at' => null, - 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, 'suspended_at' => null, 'gids' => 0, @@ -69,7 +159,7 @@ class Team extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,18 +174,14 @@ class Team extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, - 'fixed' => false, + 'cron' => false, 'flagged' => false, 'internal' => false, 'locked' => false, 'pending' => false, 'planned' => false, 'problem' => false, - 'published' => false, - 'released' => false, 'retired' => false, - 'resolved' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -135,6 +221,7 @@ class Team extends Model 'board_id', 'epic_id', 'flow_id', + 'matrix_id', 'milestone_id', 'note_id', 'project_id', @@ -152,12 +239,8 @@ class Team extends Model 'canceled_at', 'closed_at', 'embargo_at', - 'fixed_at', 'postponed_at', - 'published_at', - 'released_at', 'resumed_at', - 'resolved_at', 'suspended_at', 'gids', 'po', @@ -185,18 +268,14 @@ class Team extends Model 'canceled', 'closed', 'completed', - 'duplicate', - 'fixed', + 'cron', 'flagged', 'internal', 'locked', 'pending', 'planned', 'problem', - 'published', - 'released', 'retired', - 'resolved', 'suspended', 'unknown', 'label', @@ -217,7 +296,6 @@ class Team extends Model 'board', 'flow', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -242,12 +320,8 @@ protected function casts(): array 'canceled_at' => 'datetime', 'closed_at' => 'datetime', 'embargo_at' => 'datetime', - 'fixed_at' => 'datetime', 'postponed_at' => 'datetime', - 'published_at' => 'datetime', - 'released_at' => 'datetime', 'resumed_at' => 'datetime', - 'resolved_at' => 'datetime', 'suspended_at' => 'datetime', 'gids' => 'integer', 'po' => 'integer', @@ -260,7 +334,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,18 +349,14 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', - 'duplicate' => 'boolean', - 'fixed' => 'boolean', + 'cron' => 'boolean', 'flagged' => 'boolean', 'internal' => 'boolean', 'locked' => 'boolean', 'pending' => 'boolean', 'planned' => 'boolean', 'problem' => 'boolean', - 'published' => 'boolean', - 'released' => 'boolean', 'retired' => 'boolean', - 'resolved' => 'boolean', 'suspended' => 'boolean', 'unknown' => 'boolean', 'label' => 'string', @@ -362,6 +432,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the team. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the team. */ @@ -374,6 +456,18 @@ public function milestone(): HasOne ); } + /** + * The note of the team. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the team. */ diff --git a/src/Models/Ticket.php b/src/Models/Ticket.php index 5efcba1..8027562 100644 --- a/src/Models/Ticket.php +++ b/src/Models/Ticket.php @@ -1,9 +1,9 @@ null, 'owned_by_id' => null, 'parent_id' => null, - 'duplicate_id' => null, + 'ticket_type' => null, 'backlog_id' => null, 'board_id' => null, 'completed_by_id' => null, + 'duplicate_id' => null, 'epic_id' => null, 'fixed_by_id' => null, 'flow_id' => null, @@ -169,9 +172,8 @@ class Ticket extends Model 'sprint_id' => null, 'tag_id' => null, 'team_id' => null, - 'version_id' => null, 'version_fixed_id' => null, - 'ticket_type' => null, + 'version_id' => null, 'created_at' => null, 'updated_at' => null, 'deleted_at' => null, @@ -186,8 +188,8 @@ class Ticket extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -200,7 +202,7 @@ class Ticket extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -215,6 +217,7 @@ class Ticket extends Model 'canceled' => false, 'closed' => false, 'completed' => false, + 'cron' => false, 'duplicate' => false, 'fixed' => false, 'flagged' => false, @@ -222,6 +225,7 @@ class Ticket extends Model 'locked' => false, 'pending' => false, 'planned' => false, + 'prioritized' => false, 'problem' => false, 'published' => false, 'released' => false, @@ -238,10 +242,10 @@ class Ticket extends Model 'introduction' => '', 'content' => null, 'summary' => null, - 'key' => '', 'handler' => '', - 'code' => 0, - 'key_code_hash' => '', + 'key' => null, + 'code' => null, + 'key_code_hash' => null, 'priority' => '', 'severity' => '', 'resolution' => '', @@ -251,8 +255,8 @@ class Ticket extends Model 'points' => 0, 'actual' => null, 'expected' => null, - 'steps' => null, 'story' => null, + 'steps' => null, 'criteria' => null, 'reproducibility' => null, 'icon' => '', @@ -298,8 +302,8 @@ class Ticket extends Model 'sprint_id', 'tag_id', 'team_id', - 'version_id', 'version_fixed_id', + 'version_id', 'start_at', 'planned_start_at', 'end_at', @@ -340,6 +344,7 @@ class Ticket extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -347,6 +352,7 @@ class Ticket extends Model 'locked', 'pending', 'planned', + 'prioritized', 'problem', 'published', 'released', @@ -363,10 +369,7 @@ class Ticket extends Model 'introduction', 'content', 'summary', - 'key', 'handler', - 'code', - 'key_code_hash', 'priority', 'severity', 'resolution', @@ -378,7 +381,6 @@ class Ticket extends Model 'expected', 'story', 'steps', - 'story', 'criteria', 'reproducibility', 'icon', @@ -391,7 +393,6 @@ class Ticket extends Model 'flow', 'history', 'meta', - 'notes', 'options', 'roadmap', 'sources', @@ -449,6 +450,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -456,6 +458,7 @@ protected function casts(): array 'locked' => 'boolean', 'pending' => 'boolean', 'planned' => 'boolean', + 'prioritized' => 'boolean', 'problem' => 'boolean', 'published' => 'boolean', 'released' => 'boolean', @@ -472,8 +475,8 @@ protected function casts(): array 'introduction' => 'string', 'content' => 'string', 'summary' => 'string', - 'key' => 'string', 'handler' => 'string', + 'key' => 'string', 'code' => 'integer', 'key_code_hash' => 'string', 'priority' => 'string', @@ -483,7 +486,10 @@ protected function casts(): array 'state' => 'string', 'workflow_type' => 'string', 'points' => 'integer', + 'actual' => 'string', + 'expected' => 'string', 'story' => 'string', + 'steps' => 'string', 'criteria' => 'string', 'reproducibility' => 'decimal', 'icon' => 'string', @@ -585,6 +591,18 @@ public function flow(): HasOne ); } + /** + * The matrix of the ticket. + */ + public function matrix(): HasOne + { + return $this->hasOne( + Matrix::class, + 'id', + 'matrix_id' + ); + } + /** * The milestone of the ticket. */ @@ -597,6 +615,18 @@ public function milestone(): HasOne ); } + /** + * The note of the ticket. + */ + public function note(): HasOne + { + return $this->hasOne( + Note::class, + 'id', + 'note_id' + ); + } + /** * The project of the ticket. */ diff --git a/src/Models/Version.php b/src/Models/Version.php index 3c63d76..d0ce95e 100644 --- a/src/Models/Version.php +++ b/src/Models/Version.php @@ -1,9 +1,9 @@ null, 'parent_id' => null, 'version_type' => null, - 'backlog_id' => null, - 'board_id' => null, - 'epic_id' => null, - 'flow_id' => null, - 'milestone_id' => null, - 'note_id' => null, + 'matrix_id' => null, 'project_id' => null, - 'release_id' => null, 'roadmap_id' => null, 'source_id' => null, - 'sprint_id' => null, 'tag_id' => null, 'team_id' => null, 'ticket_id' => null, @@ -55,8 +136,8 @@ class Version extends Model 'postponed_at' => null, 'published_at' => null, 'released_at' => null, - 'resolved_at' => null, 'resumed_at' => null, + 'resolved_at' => null, 'suspended_at' => null, 'gids' => 0, 'po' => 0, @@ -69,7 +150,7 @@ class Version extends Model 'status' => 0, 'rank' => 0, 'size' => 0, - 'matrix' => '', + 'matrix' => '{}', 'x' => null, 'y' => null, 'z' => null, @@ -84,7 +165,6 @@ class Version extends Model 'canceled' => false, 'closed' => false, 'completed' => false, - 'duplicate' => false, 'fixed' => false, 'flagged' => false, 'internal' => false, @@ -94,8 +174,8 @@ class Version extends Model 'problem' => false, 'published' => false, 'released' => false, - 'retired' => false, 'resolved' => false, + 'retired' => false, 'suspended' => false, 'unknown' => false, 'label' => '', @@ -112,13 +192,9 @@ class Version extends Model 'avatar' => '', 'ui' => '{}', 'assets' => '{}', - 'backlog' => '{}', - 'board' => '{}', - 'flow' => '{}', 'meta' => '{}', 'notes' => '[]', 'options' => '{}', - 'roadmap' => '{}', 'sources' => '{}', ]; @@ -131,17 +207,10 @@ class Version extends Model 'owned_by_id', 'parent_id', 'version_type', - 'backlog_id', - 'board_id', - 'epic_id', - 'flow_id', - 'milestone_id', - 'note_id', + 'matrix_id', 'project_id', - 'release_id', 'roadmap_id', 'source_id', - 'sprint_id', 'tag_id', 'team_id', 'ticket_id', @@ -185,6 +254,7 @@ class Version extends Model 'canceled', 'closed', 'completed', + 'cron', 'duplicate', 'fixed', 'flagged', @@ -213,13 +283,8 @@ class Version extends Model 'avatar', 'ui', 'assets', - 'backlog', - 'board', - 'flow', 'meta', - 'notes', 'options', - 'roadmap', 'sources', ]; @@ -260,7 +325,7 @@ protected function casts(): array 'status' => 'integer', 'rank' => 'integer', 'size' => 'integer', - 'matrix' => 'string', + 'matrix' => 'array', 'x' => 'integer', 'y' => 'integer', 'z' => 'integer', @@ -275,6 +340,7 @@ protected function casts(): array 'canceled' => 'boolean', 'closed' => 'boolean', 'completed' => 'boolean', + 'cron' => 'boolean', 'duplicate' => 'boolean', 'fixed' => 'boolean', 'flagged' => 'boolean', @@ -303,74 +369,22 @@ protected function casts(): array 'avatar' => 'string', 'ui' => 'array', 'assets' => 'array', - 'backlog' => 'array', - 'board' => 'array', - 'flow' => 'array', 'meta' => 'array', 'notes' => 'array', 'options' => 'array', - 'roadmap' => 'array', 'sources' => 'array', ]; } /** - * The backlog of the version. - */ - public function backlog(): HasOne - { - return $this->hasOne( - Backlog::class, - 'id', - 'backlog_id' - ); - } - - /** - * The board of the version. - */ - public function board(): HasOne - { - return $this->hasOne( - Board::class, - 'id', - 'board_id' - ); - } - - /** - * The epic of the version. - */ - public function epic(): HasOne - { - return $this->hasOne( - Epic::class, - 'id', - 'epic_id' - ); - } - - /** - * The flow of the version. - */ - public function flow(): HasOne - { - return $this->hasOne( - Flow::class, - 'id', - 'flow_id' - ); - } - - /** - * The milestone of the version. + * The matrix of the version. */ - public function milestone(): HasOne + public function matrix(): HasOne { return $this->hasOne( - Milestone::class, + Matrix::class, 'id', - 'milestone_id' + 'matrix_id' ); } @@ -386,18 +400,6 @@ public function project(): HasOne ); } - /** - * The release of the version. - */ - public function release(): HasOne - { - return $this->hasOne( - Release::class, - 'id', - 'release_id' - ); - } - /** * The roadmap of the version. */ @@ -422,18 +424,6 @@ public function source(): HasOne ); } - /** - * The sprint of the version. - */ - public function sprint(): HasOne - { - return $this->hasOne( - Sprint::class, - 'id', - 'sprint_id' - ); - } - /** * The tag of the version. */ diff --git a/tests/Feature/Models/Backlog/ModelTest.php b/tests/Feature/Models/Backlog/ModelTest.php index 3b66bc2..e2060bd 100644 --- a/tests/Feature/Models/Backlog/ModelTest.php +++ b/tests/Feature/Models/Backlog/ModelTest.php @@ -1,9 +1,9 @@ > Test has many relationships. + */ + protected array $hasMany = [ + 'sprints' => [ + 'key' => 'backlog_id', + 'modelClass' => \Playground\Matrix\Models\Sprint::class, + ], + 'tickets' => [ + 'key' => 'backlog_id', + 'modelClass' => \Playground\Matrix\Models\Ticket::class, + ], + ]; + + /** + * @var array> Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +42,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -53,6 +70,11 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Board/ModelTest.php b/tests/Feature/Models/Board/ModelTest.php index 0ee8bf9..e1a7618 100644 --- a/tests/Feature/Models/Board/ModelTest.php +++ b/tests/Feature/Models/Board/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Epic/ModelTest.php b/tests/Feature/Models/Epic/ModelTest.php index 14cf93c..b2fbb6a 100644 --- a/tests/Feature/Models/Epic/ModelTest.php +++ b/tests/Feature/Models/Epic/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -53,11 +56,21 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Flow/ModelTest.php b/tests/Feature/Models/Flow/ModelTest.php index f1ef2d3..cda7e4f 100644 --- a/tests/Feature/Models/Flow/ModelTest.php +++ b/tests/Feature/Models/Flow/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'note' => [ 'key' => 'note_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Matrix/ModelTest.php b/tests/Feature/Models/Matrix/ModelTest.php index 6621716..f848fbb 100644 --- a/tests/Feature/Models/Matrix/ModelTest.php +++ b/tests/Feature/Models/Matrix/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Matrix::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], ]; } diff --git a/tests/Feature/Models/Milestone/ModelTest.php b/tests/Feature/Models/Milestone/ModelTest.php index c21d53c..a99b50b 100644 --- a/tests/Feature/Models/Milestone/ModelTest.php +++ b/tests/Feature/Models/Milestone/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -58,6 +61,16 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/ModelCase.php b/tests/Feature/Models/ModelCase.php index 343cdd0..a658e10 100644 --- a/tests/Feature/Models/ModelCase.php +++ b/tests/Feature/Models/ModelCase.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ + protected array $hasOne = [ + 'creator' => [ + 'key' => 'created_by_id', + 'rule' => 'create', + 'modelClass' => \Playground\Models\User::class, + ], + 'modifier' => [ + 'key' => 'modified_by_id', + 'rule' => 'first', + 'modelClass' => \Playground\Models\User::class, + ], + 'owner' => [ + 'key' => 'owned_by_id', + 'rule' => 'first', + 'modelClass' => \Playground\Models\User::class, + ], + 'parent' => [ + 'key' => 'parent_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], + 'tag' => [ + 'key' => 'tag_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Tag::class, + ], + ]; } diff --git a/tests/Feature/Models/Project/ModelTest.php b/tests/Feature/Models/Project/ModelTest.php index fe31982..17f4e86 100644 --- a/tests/Feature/Models/Project/ModelTest.php +++ b/tests/Feature/Models/Project/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -58,11 +61,21 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'release' => [ 'key' => 'release_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Release/ModelTest.php b/tests/Feature/Models/Release/ModelTest.php index bb7a7a4..ad03eef 100644 --- a/tests/Feature/Models/Release/ModelTest.php +++ b/tests/Feature/Models/Release/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -58,11 +61,21 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Roadmap/ModelTest.php b/tests/Feature/Models/Roadmap/ModelTest.php index d7a5782..60532e8 100644 --- a/tests/Feature/Models/Roadmap/ModelTest.php +++ b/tests/Feature/Models/Roadmap/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Source/ModelTest.php b/tests/Feature/Models/Source/ModelTest.php index 5edee88..5c429e7 100644 --- a/tests/Feature/Models/Source/ModelTest.php +++ b/tests/Feature/Models/Source/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Source::class, ], - 'backlog' => [ - 'key' => 'backlog_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Backlog::class, - ], - 'board' => [ - 'key' => 'board_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Board::class, - ], - 'epic' => [ - 'key' => 'epic_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Epic::class, - ], - 'flow' => [ - 'key' => 'flow_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Flow::class, - ], - 'milestone' => [ - 'key' => 'milestone_id', + 'matrix' => [ + 'key' => 'matrix_id', 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Milestone::class, - ], - 'project' => [ - 'key' => 'project_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Project::class, - ], - 'release' => [ - 'key' => 'release_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Release::class, - ], - 'roadmap' => [ - 'key' => 'roadmap_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Roadmap::class, - ], - 'sprint' => [ - 'key' => 'sprint_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Sprint::class, + 'modelClass' => \Playground\Matrix\Models\Matrix::class, ], 'tag' => [ 'key' => 'tag_id', @@ -93,15 +53,5 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Team::class, ], - 'ticket' => [ - 'key' => 'ticket_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Ticket::class, - ], - 'version' => [ - 'key' => 'version_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Version::class, - ], ]; } diff --git a/tests/Feature/Models/Sprint/ModelTest.php b/tests/Feature/Models/Sprint/ModelTest.php index 93eec4e..0b6c5e9 100644 --- a/tests/Feature/Models/Sprint/ModelTest.php +++ b/tests/Feature/Models/Sprint/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -58,6 +61,16 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Tag/ModelTest.php b/tests/Feature/Models/Tag/ModelTest.php index d304135..d1e7101 100644 --- a/tests/Feature/Models/Tag/ModelTest.php +++ b/tests/Feature/Models/Tag/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Tag::class, ], - 'backlog' => [ - 'key' => 'backlog_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Backlog::class, - ], - 'board' => [ - 'key' => 'board_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Board::class, - ], - 'epic' => [ - 'key' => 'epic_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Epic::class, - ], - 'flow' => [ - 'key' => 'flow_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Flow::class, - ], - 'milestone' => [ - 'key' => 'milestone_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Milestone::class, - ], - 'project' => [ - 'key' => 'project_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Project::class, - ], - 'release' => [ - 'key' => 'release_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Release::class, - ], - 'roadmap' => [ - 'key' => 'roadmap_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Roadmap::class, - ], - 'source' => [ - 'key' => 'source_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Source::class, - ], - 'sprint' => [ - 'key' => 'sprint_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Sprint::class, - ], - 'team' => [ - 'key' => 'team_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Team::class, - ], - 'ticket' => [ - 'key' => 'ticket_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Ticket::class, - ], - 'version' => [ - 'key' => 'version_id', + 'matrix' => [ + 'key' => 'matrix_id', 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Version::class, + 'modelClass' => \Playground\Matrix\Models\Matrix::class, ], ]; } diff --git a/tests/Feature/Models/Team/ModelTest.php b/tests/Feature/Models/Team/ModelTest.php index dd8d447..ace3451 100644 --- a/tests/Feature/Models/Team/ModelTest.php +++ b/tests/Feature/Models/Team/ModelTest.php @@ -1,9 +1,9 @@ > Test has one relationships. + */ protected array $hasOne = [ 'creator' => [ 'key' => 'created_by_id', @@ -25,12 +28,12 @@ class ModelTest extends ModelCase ], 'modifier' => [ 'key' => 'modified_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'owner' => [ 'key' => 'owned_by_id', - 'rule' => 'create', + 'rule' => 'first', 'modelClass' => \Playground\Models\User::class, ], 'parent' => [ @@ -58,11 +61,21 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Ticket/ModelTest.php b/tests/Feature/Models/Ticket/ModelTest.php index 60abfa8..5d5feac 100644 --- a/tests/Feature/Models/Ticket/ModelTest.php +++ b/tests/Feature/Models/Ticket/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Epic::class, ], + 'fixedBy' => [ + 'key' => 'fixed_by_id', + 'rule' => 'create', + 'modelClass' => \Playground\Models\User::class, + ], 'flow' => [ 'key' => 'flow_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Flow::class, ], + 'matrix' => [ + 'key' => 'matrix_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Matrix::class, + ], 'milestone' => [ 'key' => 'milestone_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Milestone::class, ], + 'note' => [ + 'key' => 'note_id', + 'rule' => 'create', + 'modelClass' => \Playground\Matrix\Models\Note::class, + ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', diff --git a/tests/Feature/Models/Version/ModelTest.php b/tests/Feature/Models/Version/ModelTest.php index 2343070..e6f26fd 100644 --- a/tests/Feature/Models/Version/ModelTest.php +++ b/tests/Feature/Models/Version/ModelTest.php @@ -1,9 +1,9 @@ 'create', 'modelClass' => \Playground\Matrix\Models\Version::class, ], - 'backlog' => [ - 'key' => 'backlog_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Backlog::class, - ], - 'board' => [ - 'key' => 'board_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Board::class, - ], - 'epic' => [ - 'key' => 'epic_id', + 'matrix' => [ + 'key' => 'matrix_id', 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Epic::class, - ], - 'flow' => [ - 'key' => 'flow_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Flow::class, - ], - 'milestone' => [ - 'key' => 'milestone_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Milestone::class, + 'modelClass' => \Playground\Matrix\Models\Matrix::class, ], 'project' => [ 'key' => 'project_id', 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Project::class, ], - 'release' => [ - 'key' => 'release_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Release::class, - ], 'roadmap' => [ 'key' => 'roadmap_id', 'rule' => 'create', @@ -83,11 +58,6 @@ class ModelTest extends ModelCase 'rule' => 'create', 'modelClass' => \Playground\Matrix\Models\Source::class, ], - 'sprint' => [ - 'key' => 'sprint_id', - 'rule' => 'create', - 'modelClass' => \Playground\Matrix\Models\Sprint::class, - ], 'tag' => [ 'key' => 'tag_id', 'rule' => 'create', diff --git a/tests/Unit/Models/Backlog/ModelTest.php b/tests/Unit/Models/Backlog/ModelTest.php index 3f38dd0..b102483 100644 --- a/tests/Unit/Models/Backlog/ModelTest.php +++ b/tests/Unit/Models/Backlog/ModelTest.php @@ -1,9 +1,9 @@ Test has many relationships. + */ + protected array $hasMany = [ + 'sprints', + 'tickets', + ]; + + /** + * @var array Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -25,6 +36,7 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', 'note', 'project', diff --git a/tests/Unit/Models/Board/ModelTest.php b/tests/Unit/Models/Board/ModelTest.php index ff9b70a..3762f8b 100644 --- a/tests/Unit/Models/Board/ModelTest.php +++ b/tests/Unit/Models/Board/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -25,7 +28,9 @@ class ModelTest extends ModelCase 'backlog', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'roadmap', diff --git a/tests/Unit/Models/Epic/ModelTest.php b/tests/Unit/Models/Epic/ModelTest.php index 92916a3..86c1ca5 100644 --- a/tests/Unit/Models/Epic/ModelTest.php +++ b/tests/Unit/Models/Epic/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -25,7 +28,9 @@ class ModelTest extends ModelCase 'backlog', 'board', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'roadmap', diff --git a/tests/Unit/Models/Flow/ModelTest.php b/tests/Unit/Models/Flow/ModelTest.php index d6bdae8..53fe816 100644 --- a/tests/Unit/Models/Flow/ModelTest.php +++ b/tests/Unit/Models/Flow/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', 'owner', 'parent', + 'matrix', 'note', 'tag', 'team', diff --git a/tests/Unit/Models/Matrix/ModelTest.php b/tests/Unit/Models/Matrix/ModelTest.php index 3536fa0..e7eed71 100644 --- a/tests/Unit/Models/Matrix/ModelTest.php +++ b/tests/Unit/Models/Matrix/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', 'owner', 'parent', + 'matrix', ]; } diff --git a/tests/Unit/Models/Milestone/ModelTest.php b/tests/Unit/Models/Milestone/ModelTest.php index d13a36a..5b47037 100644 --- a/tests/Unit/Models/Milestone/ModelTest.php +++ b/tests/Unit/Models/Milestone/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,6 +29,8 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', + 'note', 'project', 'release', 'roadmap', diff --git a/tests/Unit/Models/ModelCase.php b/tests/Unit/Models/ModelCase.php index dd461aa..ede7cdb 100644 --- a/tests/Unit/Models/ModelCase.php +++ b/tests/Unit/Models/ModelCase.php @@ -1,9 +1,9 @@ Test has one relationships. + */ + protected array $hasOne = [ + 'creator', + 'modifier', + 'owner', + 'parent', + 'matrix', + 'tag', + ]; } diff --git a/tests/Unit/Models/Project/ModelTest.php b/tests/Unit/Models/Project/ModelTest.php index 4579805..de55075 100644 --- a/tests/Unit/Models/Project/ModelTest.php +++ b/tests/Unit/Models/Project/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,7 +29,9 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'release', 'roadmap', 'source', diff --git a/tests/Unit/Models/Release/ModelTest.php b/tests/Unit/Models/Release/ModelTest.php index 62578d0..a934325 100644 --- a/tests/Unit/Models/Release/ModelTest.php +++ b/tests/Unit/Models/Release/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,7 +29,9 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'roadmap', 'source', diff --git a/tests/Unit/Models/Roadmap/ModelTest.php b/tests/Unit/Models/Roadmap/ModelTest.php index 2c7e990..4bd3436 100644 --- a/tests/Unit/Models/Roadmap/ModelTest.php +++ b/tests/Unit/Models/Roadmap/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,7 +29,9 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'source', diff --git a/tests/Unit/Models/Source/ModelTest.php b/tests/Unit/Models/Source/ModelTest.php index a37deb9..d715c11 100644 --- a/tests/Unit/Models/Source/ModelTest.php +++ b/tests/Unit/Models/Source/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', 'owner', 'parent', - 'backlog', - 'board', - 'epic', - 'flow', - 'milestone', - 'project', - 'release', - 'roadmap', - 'sprint', + 'matrix', 'tag', 'team', - 'ticket', - 'version', ]; } diff --git a/tests/Unit/Models/Sprint/ModelTest.php b/tests/Unit/Models/Sprint/ModelTest.php index 3bc330f..c68efd2 100644 --- a/tests/Unit/Models/Sprint/ModelTest.php +++ b/tests/Unit/Models/Sprint/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,7 +29,9 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'roadmap', diff --git a/tests/Unit/Models/Tag/ModelTest.php b/tests/Unit/Models/Tag/ModelTest.php index 0968ea6..198c758 100644 --- a/tests/Unit/Models/Tag/ModelTest.php +++ b/tests/Unit/Models/Tag/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', 'owner', 'parent', - 'backlog', - 'board', - 'epic', - 'flow', - 'milestone', - 'project', - 'release', - 'roadmap', - 'source', - 'sprint', - 'team', - 'ticket', - 'version', + 'matrix', ]; } diff --git a/tests/Unit/Models/Team/ModelTest.php b/tests/Unit/Models/Team/ModelTest.php index b2d20f3..19038bd 100644 --- a/tests/Unit/Models/Team/ModelTest.php +++ b/tests/Unit/Models/Team/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,7 +29,9 @@ class ModelTest extends ModelCase 'board', 'epic', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'roadmap', diff --git a/tests/Unit/Models/Ticket/ModelTest.php b/tests/Unit/Models/Ticket/ModelTest.php index f82da53..b597e9e 100644 --- a/tests/Unit/Models/Ticket/ModelTest.php +++ b/tests/Unit/Models/Ticket/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', @@ -26,8 +29,11 @@ class ModelTest extends ModelCase 'board', 'completedBy', 'epic', + 'fixedBy', 'flow', + 'matrix', 'milestone', + 'note', 'project', 'release', 'reportedBy', diff --git a/tests/Unit/Models/Version/ModelTest.php b/tests/Unit/Models/Version/ModelTest.php index 74c0305..66c9c99 100644 --- a/tests/Unit/Models/Version/ModelTest.php +++ b/tests/Unit/Models/Version/ModelTest.php @@ -1,9 +1,9 @@ Test has one relationships. + */ protected array $hasOne = [ 'creator', 'modifier', 'owner', 'parent', - 'backlog', - 'board', - 'epic', - 'flow', - 'milestone', + 'matrix', 'project', - 'release', 'roadmap', 'source', - 'sprint', 'tag', 'team', 'ticket',