| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace App\Module\Farm\Models;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\HasMany;
- /**
- * 收获记录模型
- * field start
- * @property int $id 主键ID
- * @property int $user_id 用户ID
- * @property int $land_id 土地ID
- * @property int $crop_id 作物ID
- * @property int $seed_id 种子ID
- * @property int $output_amount 产出数量
- * @property string $harvest_time 收获时间
- * @property \Carbon\Carbon $created_at 创建时间
- * field end
- */
- class FarmHarvestLog extends Model
- {
- /**
- * 与模型关联的表名
- *
- * @var string
- */
- protected $table = 'farm_harvest_logs';
- /**
- * 可批量赋值的属性
- *
- * @var array
- */
- protected $fillable = [
- 'user_id',
- 'land_id',
- 'crop_id',
- 'seed_id',
- 'output_amount',
- 'harvest_time',
- ];
- /**
- * 应该被转换为日期的属性
- *
- * @var array
- */
- protected $dates = [
- 'harvest_time',
- 'created_at',
- ];
- /**
- * 表明模型是否应该被打上时间戳
- *
- * @var bool
- */
- public $timestamps = false;
- }
|