| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <?php
- namespace app\models;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%video_shop_goods_ext}}".
- *
- * @property integer $id
- * @property string $product_id
- * @property integer $goods_id
- * @property integer $store_id
- * @property integer $mini_id
- * @property integer $status
- * @property integer $is_delete
- * @property string $created_at
- * @property string $updated_at
- * @property integer $wx_status
- * @property integer $wx_edit_status
- * @property string $wx_status_reason
- * @property integer $wx_product_info
- */
- class VideoShopGoodsExt extends \yii\db\ActiveRecord
- {
-
- public static function wx_status_name($status = 0){
- $arr = [
- 0 => '初始值',
- 5 => '上架',
- 6 => '回收站',
- 11 => '自主下架',
- 13 => '违规下架/风控系统下架',
- 14 => '保证金不足下架',
- 15 => '品牌过期下架',
- 20 => '商品被封禁',
- ];
- return isset($status) ? $arr[$status] : $arr;
- }
- public static function wx_edit_status_name($status = 0){
- $arr = [
- 0=>'初始值',
- 1=>'编辑中',
- 2=>'审核中',
- 3=>'审核失败',
- 4=>'审核成功',
- 7=>'商品异步提交,上传中(处于该状态的商品调用上架商品接口会返回10020067)',
- 8=>'商品异步提交,上传失败(请重新提交)',
- ];
- return isset($status) ? $arr[$status] : $arr;
- }
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%video_shop_goods_ext}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'goods_id', 'is_delete', 'store_id', 'mini_id', 'status', 'wx_status', 'wx_edit_status'], 'integer'],
- [['product_id'], 'string'],
- [['created_at', 'updated_at', 'wx_product_info', 'wx_status_reason'], 'safe']
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- "id" => "",
- "product_id" => "商品id",
- "goods_id" => "商品id",
- 'mini_id' => '',
- 'status' => '',
- 'wx_status' => '商品线上状态',
- "is_delete" => "",
- "created_at" => "",
- "updated_at" => "",
- "store_id" => ""
- ];
- }
- }
|