AiTool.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace common\models\addons;
  3. use common\models\base\BaseActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for table "qimall_ai_tool".
  7. *
  8. * @property int $id 主键
  9. * @property string $title 中文名
  10. * @property string|null $url 跳转链接
  11. * @property string|null $cover cover
  12. * @property int $is_docking 是否对接:1:是;0:否
  13. * @property int|null $status 状态[-1:删除;0:禁用;1启用;]
  14. * @property int|null $created_at 创建时间
  15. * @property int|null $updated_at 修改时间
  16. */
  17. class AiTool extends BaseActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%ai_tool}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['is_docking', 'status', 'created_at', 'updated_at'], 'integer'],
  33. [['title'], 'string', 'max' => 20],
  34. [['url'], 'string', 'max' => 500],
  35. [['cover'], 'string', 'max' => 255],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => '主键',
  45. 'title' => '中文名',
  46. 'url' => '跳转链接',
  47. 'cover' => 'cover',
  48. 'is_docking' => '是否对接:1:是;0:否',
  49. 'status' => '状态[-1:删除;0:禁用;1启用;]',
  50. 'created_at' => '创建时间',
  51. 'updated_at' => '修改时间',
  52. ];
  53. }
  54. }