MicroFrameWork/kernel/modules/post/models/Post.php

28 lines
652 B
PHP
Raw Normal View History

2024-07-03 14:41:15 +03:00
<?php
2024-09-06 16:53:20 +03:00
namespace kernel\modules\post\models;
2024-07-03 14:41:15 +03:00
use \Illuminate\Database\Eloquent\Model;
2024-07-25 16:15:18 +03:00
/**
* @property int $id
2024-07-26 11:57:05 +03:00
* @property string $content
// * @property string $username
* @property int $user_id
2024-07-25 16:15:18 +03:00
* @method static where(int[] $array)
* @method static find($id)
*/
2024-07-03 14:41:15 +03:00
class Post extends Model
{
2024-07-10 14:39:37 +03:00
protected $table = 'post';
2024-07-26 11:57:05 +03:00
protected $fillable = ['content', 'user_id'];
2024-07-25 16:15:18 +03:00
public static function labels(): array
{
return [
2024-07-26 11:57:05 +03:00
'content' => 'Контент',
'user_id' => 'Id пользователя',
2024-07-25 16:15:18 +03:00
'created_at' => 'Создан',
'updated_at' => 'Обновлен'
];
}
2024-07-03 14:41:15 +03:00
}