1 | <?php |
||
11 | class ComputerCatalog extends Base |
||
12 | { |
||
13 | public static $apresentationName = 'Servidores'; |
||
14 | |||
15 | protected $organizationPerspective = true; |
||
16 | |||
17 | protected $table = 'computer_catalogs'; |
||
18 | |||
19 | /** |
||
20 | * The attributes that are mass assignable. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $fillable = [ |
||
25 | 'name', |
||
26 | 'type', |
||
27 | 'location', |
||
28 | 'computer_id', |
||
29 | ]; |
||
30 | |||
31 | |||
32 | protected $mappingProperties = array( |
||
33 | |||
34 | 'customer_id' => [ |
||
35 | 'type' => 'integer', |
||
36 | "analyzer" => "standard", |
||
37 | ], |
||
38 | ); |
||
39 | |||
40 | |||
41 | public $formFields = [ |
||
42 | [ |
||
43 | 'name' => 'name', |
||
44 | 'label' => 'name', |
||
45 | 'type' => 'text' |
||
46 | ], |
||
47 | [ |
||
48 | 'name' => 'url', |
||
49 | 'label' => 'url', |
||
50 | 'type' => 'text' |
||
51 | ], |
||
52 | [ |
||
53 | 'name' => 'ip', |
||
54 | 'label' => 'url', |
||
55 | 'type' => 'text' |
||
56 | ], |
||
57 | [ |
||
58 | 'name' => 'instance', |
||
59 | 'label' => 'url', |
||
60 | 'type' => 'text' |
||
61 | ], |
||
62 | [ |
||
63 | 'name' => 'status', |
||
64 | 'label' => 'Status', |
||
65 | 'type' => 'checkbox' |
||
66 | ], |
||
67 | // [ |
||
68 | // 'name' => 'status', |
||
69 | // 'label' => 'Enter your content here', |
||
70 | // 'type' => 'textarea' |
||
71 | // ], |
||
72 | // ['name' => 'publish_on', 'label' => 'Publish Date', 'type' => 'date'], |
||
73 | // ['name' => 'category_id', 'label' => 'Category', 'type' => 'select', 'relationship' => 'category'], |
||
74 | // ['name' => 'tags', 'label' => 'Tags', 'type' => 'select_multiple', 'relationship' => 'tags'], |
||
75 | ]; |
||
76 | |||
77 | public $indexFields = [ |
||
78 | 'name', |
||
79 | 'url', |
||
80 | 'ip', |
||
81 | 'instance', |
||
82 | 'user', |
||
83 | 'status' |
||
84 | ]; |
||
85 | |||
86 | public $validationRules = [ |
||
87 | 'name' => 'required|max:255', |
||
88 | 'url' => 'required|max:100', |
||
89 | 'status' => 'boolean', |
||
90 | // 'publish_on' => 'date', |
||
91 | // 'published' => 'boolean', |
||
92 | // 'category_id' => 'required|int', |
||
93 | ]; |
||
94 | |||
95 | public $validationMessages = [ |
||
96 | 'name.required' => "Nome é obrigatório." |
||
97 | ]; |
||
98 | |||
99 | public $validationAttributes = [ |
||
100 | 'name' => 'Name' |
||
101 | ]; |
||
102 | |||
103 | public function getName() |
||
107 | |||
108 | public function getApresentationName() |
||
115 | |||
116 | public function connect() |
||
120 | |||
121 | |||
122 | public function user() |
||
126 | } |
||
127 |