AttributeValue.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace addons\TinyShop\common\models\product;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%addon_tiny_shop_product_attribute_value}}".
  6. *
  7. * @property int $id
  8. * @property int|null $merchant_id 商户id
  9. * @property int $product_id 商品编码
  10. * @property string $title 参数名称
  11. * @property string $value 参数值
  12. * @property int|null $type 属性对应输入类型1.直接2.单选3.多选
  13. * @property int $sort 排序
  14. * @property string|null $data
  15. * @property int $status 状态(-1:已删除,0:禁用,1:正常)
  16. * @property int|null $created_at 创建时间
  17. * @property int|null $updated_at 修改时间
  18. */
  19. class AttributeValue extends \common\models\base\BaseModel
  20. {
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%addon_tiny_shop_product_attribute_value}}';
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function rules()
  32. {
  33. return [
  34. [['merchant_id', 'product_id', 'type', 'sort', 'status', 'created_at', 'updated_at'], 'integer'],
  35. [['product_id'], 'required'],
  36. [['title'], 'string', 'max' => 125],
  37. [['value', 'data'], 'string', 'max' => 255],
  38. ];
  39. }
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function attributeLabels()
  44. {
  45. return [
  46. 'id' => 'ID',
  47. 'merchant_id' => '商户id',
  48. 'product_id' => '商品编码',
  49. 'title' => '参数名称',
  50. 'value' => '参数值',
  51. 'type' => '属性对应输入类型1.直接2.单选3.多选',
  52. 'sort' => '排序',
  53. 'data' => 'Data',
  54. 'status' => '状态(-1:已删除,0:禁用,1:正常)',
  55. 'created_at' => '创建时间',
  56. 'updated_at' => '修改时间',
  57. ];
  58. }
  59. }
粤ICP备19079148号