MdStaff.php 1.4 KB

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