| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%integral_appreciation_community}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $user_id
- * @property integer $type
- * @property float $integral
- * @property string $mobile
- * @property integer $status
- * @property integer $is_delete
- * @property string $created_at
- * @property string $updated_at
- */
- class IntegralAppreciationCommunity extends \yii\db\ActiveRecord
- {
- /**
- * 帖子类型:求购
- */
- const TYPE_BUY = 0;
- /**
- * 帖子类型:出售
- */
- const TYPE_SELL = 1;
- public static $typeArray = [
- self::TYPE_BUY => '求购',
- self::TYPE_SELL => '出售',
- ];
- /**
- * 状态:未审核
- */
- const STATUS_NO_APPLY = 0;
- /**
- * 状态:已审核
- */
- const STATUS_APPLY = 1;
- /**
- * 状态:已拒绝
- */
- const STATUS_REFUSE = 2;
- /**
- * 状态:已下线
- */
- // const STATUS_OFFLINE = 3;
- public static $statusArray = [
- self::STATUS_NO_APPLY => '未审核',
- self::STATUS_APPLY => '已通过',
- self::STATUS_REFUSE => '已拒绝',
- // self::STATUS_OFFLINE => '已下线',
- ];
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%integral_appreciation_community}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['id', 'store_id', 'user_id', 'type', 'status', 'is_delete'], 'integer'],
- [['integral', 'created_at', 'updated_at'], 'number'],
- [['mobile'], 'string']
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => '',
- 'store_id' => '店铺ID',
- 'user_id' => '用户ID',
- 'type' => '帖子类型:0=求购;1=出售;',
- 'integral' => '积分金额',
- 'mobile' => '联系方式',
- 'status' => '帖子状态:0=未审核;1=已审核;2=已下线;',
- 'is_delete' => '',
- 'created_at' => '',
- 'updated_at' => ''
- ];
- }
- }
|