Attr.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. /**
  10. * This is the model class for table "{{%attr}}".
  11. *
  12. * @property integer $id
  13. * @property integer $attr_group_id
  14. * @property string $attr_name
  15. * @property integer $is_delete
  16. * @property integer $is_default
  17. */
  18. class Attr extends \yii\db\ActiveRecord
  19. {
  20. /**
  21. * @inheritdoc
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%attr}}';
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['attr_group_id', 'attr_name'], 'required'],
  34. [['attr_group_id', 'is_delete', 'is_default'], 'integer'],
  35. [['attr_name'], 'string', 'max' => 255],
  36. ];
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'attr_group_id' => 'Attr Group ID',
  46. 'attr_name' => 'Attr Name',
  47. 'is_delete' => 'Is Delete',
  48. 'is_default' => '是否是默认属性',
  49. ];
  50. }
  51. }