First Commit
This commit is contained in:
Executable
+55
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SysCMS - Content Management System
|
||||
*
|
||||
* Copyright (c) 2026 Marco Costa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Author: Marco Costa
|
||||
* Email: contato@syspanel.com.br
|
||||
* Project: SysCMS
|
||||
*
|
||||
* This software is licensed, not sold.
|
||||
* Permission is granted to use this software
|
||||
* subject to the terms of the SysCMS Commercial License.
|
||||
*
|
||||
* Redistribution, sublicensing, resale, or
|
||||
* disclosure of this software, in whole or in part,
|
||||
* is strictly prohibited without prior written permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
||||
*/
|
||||
|
||||
namespace Modules\GlobalLists\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class City
|
||||
*
|
||||
* Model representing a city linked to a state.
|
||||
*
|
||||
* @package Modules\GlobalLists\Models
|
||||
* @property int $cities_id
|
||||
* @property int $cities_state_id
|
||||
* @property string $cities_name
|
||||
* @property string $cities_slug
|
||||
* @property string $cities_ibge_code
|
||||
*/
|
||||
class City extends Model
|
||||
{
|
||||
protected $table = 'lists_cities';
|
||||
protected $primaryKey = 'cities_id';
|
||||
protected $fillable = [
|
||||
'cities_state_id',
|
||||
'cities_name',
|
||||
'cities_slug',
|
||||
'cities_ibge_code'
|
||||
];
|
||||
|
||||
public function state()
|
||||
{
|
||||
return $this->belongsTo(State::class, 'cities_state_id', 'states_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user