AgentApi.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\DataApiNew\Models;
  3. use Illuminate\Database\Eloquent\SoftDeletes;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Dcat\Admin\Traits\HasDateTimeFormatter;
  6. // 用户接口配置
  7. class AgentApi extends Model
  8. {
  9. use SoftDeletes, HasDateTimeFormatter;
  10. protected $table = 'agent_api';
  11. protected $dateFormat = 'Y-m-d H:i:s';
  12. // 表字段
  13. protected $fillable = [
  14. 'id',
  15. 'user_id', // 用户id
  16. 'user_key',// 用户标识
  17. 'private_key', // 私钥
  18. 'public_key', // 公钥
  19. 'document_path', // 文档文件
  20. 'status', // 状态 0禁止 1允许
  21. 'created_at', // 创建时间
  22. 'updated_at', // 更新时间
  23. 'deleted_at', // 删除时间
  24. 'remark', // 备注
  25. 'ip_whitelist', // IP白名单
  26. ];
  27. // 查询字段
  28. public static $selectFields = [
  29. 'id',
  30. 'user_id', // 用户id
  31. 'user_key',// 用户标识
  32. 'private_key', // 私钥
  33. 'public_key', // 公钥
  34. 'document_path', // 文档文件
  35. 'status', // 状态 0禁止 1允许
  36. 'created_at', // 创建时间
  37. 'remark', // 备注
  38. 'ip_whitelist', // IP白名单
  39. ];
  40. }