|
- <?php
- /**
- * 数据库表类 sg_user
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 倪宗锋
- * PhpStorm LoginController.php
- * Create By 2018/03/28 16:55 $
- */
-
- namespace common\models;
-
- use yii\db\ActiveRecord;
-
- /**
- * 数据库表类 sg_user.
- * @property integer $id
- * @property integer $union_id
- * @property string $open_id
- * @property string $create_time
- * @property string $update_time
- * @property string $nike_name
- * @property string $avatar_url
- * @property integer $gender
- * @property string $city
- * @property string $province
- * @property string $country
- */
- class SgUser extends ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'sg_user';
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [[ 'gender'], 'integer'],
- [['update_time'], 'safe'],
- [['open_id', 'nick_name', 'avatar_url', 'city', 'province', 'country'], 'string', 'max' => 255],
- [['create_time'], 'string', 'max' => 20],
- [['open_id'], 'unique'],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'open_id' => 'Open ID',
- 'create_time' => 'Create Time',
- 'update_time' => 'Update Time',
- 'nick_name' => 'Nick Name',
- 'avatar_url' => 'Avatar Url',
- 'gender' => 'Gender',
- 'city' => 'City',
- 'province' => 'Province',
- 'country' => 'Country',
- ];
- }
- }
|