| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- namespace addons\WechatVideoShop\common\models;
- use common\models\goods\Goods;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_wechat_video_shop_goods".
- *
- * @property int $id
- * @property int $mall_id
- * @property int $status 状态[1启用 0禁用 -1删除]
- * @property int $created_at 创建时间
- * @property int $updated_at 更新事件
- * @property int $goods_id 商品ID
- * @property int $product_id 视频号商品ID
- * @property int $listing_status 上下架状态
- * @property string $listing_reason 视频号商品ID
- * @property array $cate_ids 类目
- * @property array $content 完整数据
- * @property array $attrs 属性
- * @property int $audit_status 审核状态
- * @property int $shop_id 审核状态
- * @property string $audit_reason 拒绝理由
- */
- class WechatVideoShopGoods extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_wechat_video_shop_goods';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'status', 'created_at', 'updated_at', 'goods_id', 'product_id', 'audit_status', 'listing_status', 'shop_id'], 'integer'],
- [['cate_ids', 'content', 'attrs'], 'required'],
- [['cate_ids', 'content', 'attrs'], 'safe'],
- [['audit_reason', 'listing_reason'], 'string', 'max' => 1000],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'status' => 'Status',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'goods_id' => 'Goods ID',
- 'product_id' => 'Product ID',
- 'cate_ids' => 'Cate Ids',
- 'content' => 'Content',
- 'attrs' => 'Attrs',
- ];
- }
- public function getShop()
- {
- return $this->hasOne(WechatVideoShop::class, ['id' => 'shop_id']);
- }
- public function getGoods()
- {
- return $this->hasOne(Goods::class, ['id' => 'goods_id']);
- }
- }
|