|
7 | 7 | |-------------------------------------------------------------------------- |
8 | 8 | | |
9 | 9 | | You can change the table names depends on your application structure |
10 | | - | the value in the below tables, is the current table name, and if |
11 | | - | are happy with it, leave it as it is. |
| 10 | + | the values in the below tables, is the current table name, and if |
| 11 | + | are happy with it, leave it as it is, if not. You may read the related |
| 12 | + | instruction before you change the values. |
12 | 13 | | |
13 | 14 | */ |
14 | 15 | 'table_names' => [ |
| 16 | + /** |
| 17 | + * Tickets table |
| 18 | + */ |
15 | 19 | 'tickets' => 'tickets', |
| 20 | + /** |
| 21 | + * Categories table for the tickets |
| 22 | + */ |
16 | 23 | 'categories' => 'categories', |
| 24 | + /** |
| 25 | + * Labels table for the tickets |
| 26 | + */ |
17 | 27 | 'labels' => 'labels', |
| 28 | + /** |
| 29 | + * Messages table to appears in the ticket |
| 30 | + */ |
18 | 31 | 'messages' => [ |
19 | 32 | 'table' => 'messages', |
| 33 | + /** |
| 34 | + * This is the foreing key for associated to the ticket |
| 35 | + * If you renamed the ticket table, you should consider |
| 36 | + * changing this column as well to follow the laravel |
| 37 | + * convention, "table_id" |
| 38 | + * |
| 39 | + * @see https://laravel.com/docs/9.x/eloquent-relationships#one-to-many |
| 40 | + */ |
20 | 41 | 'columns' => [ |
21 | 42 | 'ticket_foreing_id' => 'ticket_id', |
22 | 43 | ], |
23 | 44 | ], |
| 45 | + /** |
| 46 | + * Many to Many relationship between the tickets table |
| 47 | + * and the labels table, if you changed the one of the |
| 48 | + * tables above, you may consider change the columns |
| 49 | + * below. |
| 50 | + * |
| 51 | + * @see https://laravel.com/docs/9.x/eloquent-relationships#many-to-many |
| 52 | + */ |
24 | 53 | 'label_ticket' => [ |
25 | 54 | 'table' => 'label_ticket', |
26 | 55 | 'columns' => [ |
27 | 56 | 'label_foreign_id' => 'label_id', |
28 | 57 | 'ticket_foreign_id' => 'ticket_id', |
29 | 58 | ], |
30 | 59 | ], |
| 60 | + /** |
| 61 | + * Many to Many relationship between the tickets table |
| 62 | + * and the categories table, the above description, applies |
| 63 | + * to this also |
| 64 | + * |
| 65 | + * @see https://laravel.com/docs/9.x/eloquent-relationships#many-to-many |
| 66 | + */ |
31 | 67 | 'category_ticket' => [ |
32 | 68 | 'table' => 'category_ticket', |
33 | 69 | 'columns' => [ |
|
0 commit comments