Commit 90f65c7c authored by xiabin's avatar xiabin

修改model

parent 8799babc
......@@ -15,7 +15,7 @@ return [
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=192.168.1.185;dbname=zuiketang1',
'dsn' => 'mysql:host=192.168.1.185;dbname=zuiketang',
'username' => 'root',
'password' => 'mysql123',
'charset' => 'utf8',
......
......@@ -50,7 +50,6 @@ class Message
$content .= ' ' . Yii::$app->params['msg.signature'];
$this->query['mobile'] = $telephones;
$this->query['content'] = $content;
return FALSE;
try {
$response = $this->httpClient->request('GET', $this->hosts, [
'form_params' => $this->query
......
......@@ -21,8 +21,8 @@ use yii\web\IdentityInterface;
* @property string $avatar
* @property string $wx_open_id
* @property string $ip
* @property string $create_at
* @property string $update_at
* @property string $created_at
* @property string $updated_at
* @property string $logged_at
*
* @property BrowseRecord[] $browseRecords
......@@ -62,8 +62,8 @@ class User extends ActiveRecord implements IdentityInterface
[
'class' => TimestampBehavior::className(),
'attributes' => [
ActiveRecord::EVENT_BEFORE_INSERT => ['create_at', 'update_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['update_at'],
ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
],
// if you're using datetime instead of UNIX timestamp:
// 'value' => new Expression('NOW()'),
......@@ -78,7 +78,7 @@ class User extends ActiveRecord implements IdentityInterface
return [
[['username', 'auth_key', 'password_hash', 'telephone', 'ip', 'logged_at'], 'required'],
[['role', 'status'], 'integer'],
[['create_at', 'update_at', 'logged_at'], 'safe'],
[['created_at', 'updated_at', 'logged_at'], 'safe'],
[['username', 'auth_key', 'wx_open_id', 'ip'], 'string', 'max' => 32],
[['password_hash'], 'string', 'max' => 255],
['password_reset_token', 'string', 'max' => 32],
......@@ -106,8 +106,8 @@ class User extends ActiveRecord implements IdentityInterface
'avatar' => 'avatar',
'wx_open_id' => 'wx_open_id',
'ip' => 'ip',
'create_at' => 'create_at',
'update_at' => 'update_at',
'created_at' => 'created_at',
'updated_at' => 'updated_at',
'logged_at' => 'logged_at',
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment