get('p_sources'); } public static function tableName() { return '{{wallet_chain}}'; } public function attributeLabels() { return [ 'id' => 'ID', 'platform' => '平行链名称', 'address' => '代扣地址', 'private_key' => '代扣私钥', 'execer' => '执行器', 'fee' => '手续费', 'brower_url' => '浏览器链接', 'token' => '手续费(基础代币)', 'host' => '钱包服务IP', 'port' => '钱包服务端口', 'wallet_address' => '钱包地址', 'status' => '申请状态', 'origin' => '创建人' ]; } public function rules() { return [ [['platform', 'address', 'private_key', 'execer', 'brower_url', 'token', 'host', 'wallet_address', 'status', 'port', 'fee', 'origin'], 'required'], [['platform', 'address', 'private_key', 'execer', 'brower_url', 'token', 'host', 'wallet_address'], 'string'], [['platform'], 'string', 'length' => [1, 30]], [['token'], 'string', 'length' => [1, 10]], [['port', 'status', 'origin'], 'integer'] ]; } public function scenarios() { $scenarios = [ self:: SCENARIOS_CREATE => ['platform', 'token', 'address', 'private_key', 'fee', 'host', 'port', 'wallet_address', 'status', 'origin'], self:: SCENARIOS_UPDATE => ['platform', 'token', 'address', 'private_key', 'fee', 'host', 'port', 'wallet_address', 'status', 'origin'], ]; return array_merge(parent:: scenarios(), $scenarios); } }