FileTemplate.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace App\Module\File\Model;
  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. public static $attrlist = array (
  27. 0 => 'id',
  28. 1 => 'unid',
  29. 2 => 'file_id',
  30. 3 => 'title',
  31. 4 => 'desc',
  32. 5 => 'status',
  33. 6 => 'group',
  34. 7 => 'updated_at',
  35. 8 => 'created_at',
  36. 9 => 'deleted_at',
  37. );
  38. //attrlist end
  39. /**
  40. * 无效
  41. */
  42. const STATUS_0 = 0;
  43. /**
  44. * 有效
  45. */
  46. const STATUS_1 = 1;
  47. protected $table = 'file_template';
  48. public function file()
  49. {
  50. return $this->hasOne(FileImg::class, 'id', 'file_id');
  51. }
  52. }