FileTemplate.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Module\File\Models;
  3. use UCore\ModelCore;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. /**
  6. * 文件模板
  7. *
  8. * field start
  9. * @property int $id
  10. * @property string $unid 标识
  11. * @property int $file_id
  12. * @property string $title 模板标题
  13. * @property string $desc 描述
  14. * @property string $status
  15. * @property string $group 分组
  16. * @property \Carbon\Carbon $updated_at
  17. * @property \Carbon\Carbon $created_at
  18. * @property \Carbon\Carbon $deleted_at
  19. * field end
  20. *
  21. */
  22. class FileTemplate extends ModelCore
  23. {
  24. use SoftDeletes;
  25. // attrlist start
  26. protected $fillable = [
  27. 'id',
  28. 'unid',
  29. 'file_id',
  30. 'title',
  31. 'desc',
  32. 'status',
  33. 'group',
  34. ];
  35. // attrlist end
  36. /**
  37. * 无效
  38. */
  39. const STATUS_0 = 0;
  40. /**
  41. * 有效
  42. */
  43. const STATUS_1 = 1;
  44. protected $table = 'file_template';
  45. public function file()
  46. {
  47. return $this->hasOne(FileImg::class, 'id', 'file_id');
  48. }
  49. }