Merge pull request 'migrations' (#1) from sneha into main
Reviewed-on: Nikhil.Kadam/vib360#1
This commit is contained in:
37
app/Models/Asset.php
Normal file
37
app/Models/Asset.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Asset extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'assets';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'entity_type',
|
||||
'created_time',
|
||||
'tenant_id',
|
||||
'customer_id',
|
||||
'name',
|
||||
'type',
|
||||
'label',
|
||||
'asset_profile_id',
|
||||
'external_id',
|
||||
'version',
|
||||
'additional_info',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
'tenant_id' => 'string',
|
||||
'customer_id' => 'string',
|
||||
'asset_profile_id' => 'string',
|
||||
'external_id' => 'string',
|
||||
'additional_info' => 'array',
|
||||
];
|
||||
}
|
||||
19
app/Models/AssetDeviceLink.php
Normal file
19
app/Models/AssetDeviceLink.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AssetDeviceLink extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'user_asset_link';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'asset_id'
|
||||
];
|
||||
|
||||
}
|
||||
40
app/Models/Customer.php
Normal file
40
app/Models/Customer.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Customer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'customers';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'entity_type',
|
||||
'created_time',
|
||||
'country',
|
||||
'state',
|
||||
'city',
|
||||
'address',
|
||||
'address2',
|
||||
'zip',
|
||||
'phone',
|
||||
'email',
|
||||
'title',
|
||||
'tenant_id',
|
||||
'external_id',
|
||||
'version',
|
||||
'name',
|
||||
'additional_info',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
'tenant_id' => 'string',
|
||||
'external_id' => 'string',
|
||||
'additional_info' => 'array',
|
||||
];
|
||||
}
|
||||
43
app/Models/Device.php
Normal file
43
app/Models/Device.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Device extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'devices';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'entity_type',
|
||||
'created_time',
|
||||
'tenant_id',
|
||||
'customer_id',
|
||||
'name',
|
||||
'type',
|
||||
'label',
|
||||
'device_profile_id',
|
||||
'firmware_id',
|
||||
'software_id',
|
||||
'external_id',
|
||||
'version',
|
||||
'additional_info',
|
||||
'device_data',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
'tenant_id' => 'string',
|
||||
'customer_id' => 'string',
|
||||
'device_profile_id' => 'string',
|
||||
'firmware_id' => 'string',
|
||||
'software_id' => 'string',
|
||||
'external_id' => 'string',
|
||||
'additional_info' => 'array',
|
||||
'device_data' => 'array',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user