*/ namespace common\models\psources; use common\core\BaseActiveRecord; use Yii; /** * @property integer $id * @property integer $uid * @property integer $mid * @property string $mobile * @property string $coin * @property double $amount * @property string $to_address * @property integer $check_first_status * @property integer $check_first_uid * @property integer $check_second_status * @property integer $check_second_uid * @property integer $status * @property string $create_time * @property string $update_time */ class CoinReleaseCheck extends BaseActiveRecord { const SCENARIOS_CHECK = 'check'; //审核列表筛选 const SCENARIOS_SEARCH = 'search'; //查询列表筛选 const CHECK_FIRST_STATUS_NORMAL = 1; // 初审未审核 const CHECK_FIRST_STATUS_SUCCEED = 2; // 初审审核通过 const CHECK_FIRST_STATUS_FAILD = 3; // 初审审核未通过 const CHECK_SECOND_STATUS_NORMAL = 1; // 复审未审核 const CHECK_SECOND_STATUS_SUCCEED = 2; // 复审审核通过 const CHECK_SECOND_STATUS_FAILD = 3; // 复审审核未通过 const STATUS_NORMAL = 0; // 提币申请审核未通过 const STATUS_PADDING = 1; // 提币申请审核完成,提币未完成 const STATUS_CANCEL = 2; // 提币申请被撤提 const STATUS_FAILD = 3; // 提币失败 const STATUS_SUCCEED = 4; // 提币成功 public $start_time = ''; public $end_time = ''; public static function getDb() { return Yii::$app->get('p_sources'); } public static function tableName() { return '{{%coin_release_check}}'; } public function formName() { return ''; } public function attributeLabels() { return [ 'id' => 'ID', 'uid' => 'UID', 'mobile' => '手机', 'coin' => '币种', 'to_address' => '对方地址', 'check_first_status' => '初审状态', 'check_first_uid' => '初审员', 'check_second_status' => '复审状态', 'check_second_uid' => '复审员', 'create_time' => '创建时间', 'update_time' => '更新时间', 'start_time' => '提交开始时间', 'end_time' => '提交结束时间', 'status' => '审核状态', ]; } public function sercians() { return [ self::SCENARIOS_CHECK => ['coin', 'start_time', 'end_time', 'mobile'], self::SCENARIOS_SEARCH => [ 'status', 'coin', 'check_first_uid', 'check_second_uid', 'start_time', 'end_time', 'mobile' ], ]; } public function rules() { return [ [ [ 'id', 'uid', 'check_first_status', 'check_first_uid', 'check_second_status', 'check_second_uid', 'status' ], 'integer' ], [ ['mobile', 'coin', 'to_address', 'create_time', 'update_time', 'start_time', 'end_time'], 'string', 'max' => 255 ], [['end_time'], 'compare', 'compareAttribute' => 'start_time', 'operator' => '>=', 'skipOnEmpty' => true], [['coin', 'start_time', 'end_time', 'mobile'], 'default', 'value' => '', 'on' => self::SCENARIOS_CHECK], [ ['status', 'coin', 'check_first_uid', 'check_second_uid', 'start_time', 'end_time', 'mobile'], 'default', 'value' => '', 'on' => self::SCENARIOS_SEARCH ], ]; } }