| @@ 14-82 (lines=69) @@ | ||
| 11 | ||
| 12 | namespace Gitamin\Commands\Owner; |
|
| 13 | ||
| 14 | final class AddOwnerCommand |
|
| 15 | { |
|
| 16 | /** |
|
| 17 | * The project owner name. |
|
| 18 | * |
|
| 19 | * @var string |
|
| 20 | */ |
|
| 21 | public $name; |
|
| 22 | ||
| 23 | /** |
|
| 24 | * The project owner path. |
|
| 25 | * |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | public $path; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * The project owner user_id. |
|
| 32 | * |
|
| 33 | * @var int |
|
| 34 | */ |
|
| 35 | public $user_id; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * The project owner description. |
|
| 39 | * |
|
| 40 | * @var text |
|
| 41 | */ |
|
| 42 | public $description; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * The project namespace type. |
|
| 46 | * |
|
| 47 | * @var string |
|
| 48 | */ |
|
| 49 | public $type; |
|
| 50 | ||
| 51 | /** |
|
| 52 | * The validation rules. |
|
| 53 | * |
|
| 54 | * @var string[] |
|
| 55 | */ |
|
| 56 | public $rules = [ |
|
| 57 | 'name' => 'required|string', |
|
| 58 | 'path' => 'required|string', |
|
| 59 | 'user_id' => 'int', |
|
| 60 | 'type' => 'string', |
|
| 61 | ]; |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Create a add project team command instance. |
|
| 65 | * |
|
| 66 | * @param string $name |
|
| 67 | * @param string $path |
|
| 68 | * @param int $user_id |
|
| 69 | * @param string $description |
|
| 70 | * @param string $type |
|
| 71 | * |
|
| 72 | * @return void |
|
| 73 | */ |
|
| 74 | public function __construct($name, $path, $user_id, $description, $type) |
|
| 75 | { |
|
| 76 | $this->name = $name; |
|
| 77 | $this->path = $path; |
|
| 78 | $this->user_id = $user_id; |
|
| 79 | $this->description = $description; |
|
| 80 | $this->type = $type; |
|
| 81 | } |
|
| 82 | } |
|
| 83 | ||
| @@ 16-84 (lines=69) @@ | ||
| 13 | ||
| 14 | use Gitamin\Models\Owner; |
|
| 15 | ||
| 16 | final class UpdateOwnerCommand |
|
| 17 | { |
|
| 18 | /** |
|
| 19 | * The project owner instance. |
|
| 20 | * |
|
| 21 | * @var \Gitamin\Models\Owner |
|
| 22 | */ |
|
| 23 | public $owner; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * The project owner name. |
|
| 27 | * |
|
| 28 | * @var string |
|
| 29 | */ |
|
| 30 | public $name; |
|
| 31 | ||
| 32 | /** |
|
| 33 | * The project owner path. |
|
| 34 | * |
|
| 35 | * @var string |
|
| 36 | */ |
|
| 37 | public $path; |
|
| 38 | ||
| 39 | /** |
|
| 40 | * The project owner user_id. |
|
| 41 | * |
|
| 42 | * @var int |
|
| 43 | */ |
|
| 44 | public $user_id; |
|
| 45 | ||
| 46 | /** |
|
| 47 | * The project owner description. |
|
| 48 | * |
|
| 49 | * @var string |
|
| 50 | */ |
|
| 51 | public $description; |
|
| 52 | ||
| 53 | /** |
|
| 54 | * The validation rules. |
|
| 55 | * |
|
| 56 | * @var string[] |
|
| 57 | */ |
|
| 58 | public $rules = [ |
|
| 59 | 'name' => 'string', |
|
| 60 | 'path' => 'string', |
|
| 61 | 'user_id' => 'int', |
|
| 62 | 'description' => 'string', |
|
| 63 | ]; |
|
| 64 | ||
| 65 | /** |
|
| 66 | * Create an add project owner command instance. |
|
| 67 | * |
|
| 68 | * @param \Gitamin\Models\ProjectNamepsace $owner |
|
| 69 | * @param string $name |
|
| 70 | * @param string $path |
|
| 71 | * @param int $user_id |
|
| 72 | * @param string $description |
|
| 73 | * |
|
| 74 | * @return void |
|
| 75 | */ |
|
| 76 | public function __construct($owner, $name, $path, $user_id, $description) |
|
| 77 | { |
|
| 78 | $this->owner = $owner; |
|
| 79 | $this->name = $name; |
|
| 80 | $this->path = $path; |
|
| 81 | $this->user_id = $user_id; |
|
| 82 | $this->description = $description; |
|
| 83 | } |
|
| 84 | } |
|
| 85 | ||