| 1 | <?php |
||
| 11 | class Country extends ChocolateyModel |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Disable Timestamps. |
||
| 15 | * |
||
| 16 | * @var bool |
||
| 17 | */ |
||
| 18 | public $timestamps = false; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The table associated with the model. |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $table = 'chocolatey_shop_countries'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The Appender(s) of the Model. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $appends = ['uniqueId']; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Primary Key of the Table. |
||
| 36 | * |
||
| 37 | * @var string |
||
| 38 | */ |
||
| 39 | protected $primaryKey = 'id'; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Store an Shop Country. |
||
| 43 | * |
||
| 44 | * @param string $countryCode |
||
| 45 | * @param string $name |
||
| 46 | * |
||
| 47 | * @return Country |
||
| 48 | */ |
||
| 49 | public function store(string $countryCode, string $name): Country |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get Unique Id. |
||
| 60 | * |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getUniqueIdAttribute(): int |
||
| 67 | } |
||
| 68 |