WorkerCat.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%worker_cat}}".
  13. *
  14. * @property integer $id
  15. * @property integer $store_id
  16. * @property string $name
  17. * @property string $pic_url
  18. * @property integer $sort
  19. * @property integer $is_delete
  20. * @property integer $is_show
  21. * @property integer $created_at
  22. * @property integer $updated_at
  23. */
  24. class WorkerCat extends \yii\db\ActiveRecord
  25. {
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%worker_cat}}';
  32. }
  33. public function behaviors()
  34. {
  35. return [
  36. [
  37. 'class' => TimestampBehavior::class,
  38. ]
  39. ];
  40. }
  41. /**
  42. * @inheritdoc
  43. */
  44. public function rules()
  45. {
  46. return [
  47. [['id', 'store_id', 'sort', 'is_delete', 'is_show', 'created_at', 'updated_at'], 'integer'],
  48. [['created_at', 'updated_at'], 'safe'],
  49. [['name', 'pic_url'], 'string']
  50. ];
  51. }
  52. }