StoreGoodsCredit.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace addons\Store\common\models;
  3. use common\models\base\BaseActiveRecord;
  4. use Yii;
  5. /**
  6. * This is the model class for table "qimall_addons_store_goods_credit".
  7. *
  8. * @property int $id
  9. * @property int $mall_id
  10. * @property int $store_id 门店id
  11. * @property string $goods_id 商品id
  12. * @property float $rate 赊账比例
  13. * @property int $status 状态[0禁用 1启用 -1删除]
  14. * @property int $created_at 创建时间
  15. * @property int $updated_at 修改时间
  16. */
  17. class StoreGoodsCredit extends BaseActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%addons_store_goods_credit}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['mall_id', 'store_id', 'status', 'created_at', 'updated_at'], 'integer'],
  33. [['rate'], 'number'],
  34. [['goods_id'], 'string', 'max' => 100],
  35. ];
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function attributeLabels()
  41. {
  42. return [
  43. 'id' => 'ID',
  44. 'mall_id' => 'Mall ID',
  45. 'store_id' => 'Store ID',
  46. 'goods_id' => 'Goods ID',
  47. 'rate' => 'Rate',
  48. 'status' => 'Status',
  49. 'created_at' => 'Created At',
  50. 'updated_at' => 'Updated At',
  51. ];
  52. }
  53. }