WechatVideoShopCateAudit.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. namespace addons\WechatVideoShop\common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "qimall_addons_wechat_video_shop_cate_audit".
  6. *
  7. * @property int $id
  8. * @property int $mall_id
  9. * @property int $status 状态[1启用 0禁用 -1删除]
  10. * @property int $created_at 创建时间
  11. * @property int $updated_at 更新事件
  12. * @property int $audit_id 审核ID
  13. * @property int $audit_status 审核状态
  14. * @property string $audit_reason 拒绝理由
  15. * @property int $cat_one 一级类目
  16. * @property int $cat_two 二级类目
  17. * @property int $cat_three 三级类目
  18. * @property int $shop_id 三级类目
  19. * @property array $req 提交数据
  20. */
  21. class WechatVideoShopCateAudit extends \common\models\base\BaseActiveRecord
  22. {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public static function tableName()
  27. {
  28. return 'qimall_addons_wechat_video_shop_cate_audit';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['mall_id', 'status', 'created_at', 'updated_at', 'audit_id', 'audit_status', 'cat_one', 'cat_two', 'cat_three', 'shop_id'], 'integer'],
  37. [['req'], 'safe'],
  38. [['audit_reason'], 'string', 'max' => 1000],
  39. ];
  40. }
  41. /**
  42. * {@inheritdoc}
  43. */
  44. public function attributeLabels()
  45. {
  46. return [
  47. 'id' => 'ID',
  48. 'mall_id' => 'Mall ID',
  49. 'status' => 'Status',
  50. 'created_at' => 'Created At',
  51. 'updated_at' => 'Updated At',
  52. 'audit_id' => 'Audit ID',
  53. 'audit_status' => 'Audit Status',
  54. 'audit_reason' => 'Audit Reason',
  55. 'cat_one' => 'Cat One',
  56. 'cat_two' => 'Cat Two',
  57. 'cat_three' => 'Cat Three',
  58. 'req' => 'Req',
  59. ];
  60. }
  61. /**
  62. * @return \yii\db\ActiveQuery
  63. */
  64. public function getCatOne()
  65. {
  66. return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_one']);
  67. }
  68. /**
  69. * @return \yii\db\ActiveQuery
  70. */
  71. public function getCatTwo()
  72. {
  73. return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_two']);
  74. }
  75. /**
  76. * @return \yii\db\ActiveQuery
  77. */
  78. public function getCatThree()
  79. {
  80. return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_three']);
  81. }
  82. public function getShop()
  83. {
  84. return $this->hasOne(WechatVideoShop::class, ['id' => 'shop_id']);
  85. }
  86. }