'求购', 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' => '' ]; } }