Installation.php 816 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Installation extends Model
  5. {
  6. protected $table = 'QPRecordDB.dbo.installations'; // 数据表名
  7. protected $fillable = [
  8. 'app_token', 'app_name', 'app_name_dashboard', 'activity_kind',
  9. 'adid', 'gps_adid', 'country', 'city', 'language', 'is_organic',
  10. 'first_tracker', 'fb_install_referrer', 'device_manufacturer', 'device_name','ip_address','meta_install_referrer'
  11. ]; // 可批量赋值的属性
  12. // public $timestamps = true; // 启用自动时间戳
  13. protected $casts = [
  14. 'is_organic' => 'boolean',
  15. ]; // 属性的类型转换
  16. // protected $dateFormat = 'Y-m-d H:i:s'; // 定义数据库使用的日期格式
  17. // 可以根据需要定义更多的模型方法或业务逻辑
  18. }