You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

77 lines
2.0 KiB

  1. <?php
  2. /**
  3. * 数据库表类 sg_user
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 倪宗锋
  12. * PhpStorm LoginController.php
  13. * Create By 2018/03/28 16:55 $
  14. */
  15. namespace common\models;
  16. use yii\db\ActiveRecord;
  17. /**
  18. * 数据库表类 sg_user.
  19. * @property integer $id
  20. * @property integer $union_id
  21. * @property string $open_id
  22. * @property string $create_time
  23. * @property string $update_time
  24. * @property string $nike_name
  25. * @property string $avatar_url
  26. * @property integer $gender
  27. * @property string $city
  28. * @property string $province
  29. * @property string $country
  30. */
  31. class SgUser extends ActiveRecord
  32. {
  33. /**
  34. * @inheritdoc
  35. */
  36. public static function tableName()
  37. {
  38. return 'sg_user';
  39. }
  40. /**
  41. * @inheritdoc
  42. */
  43. public function rules()
  44. {
  45. return [
  46. [[ 'gender'], 'integer'],
  47. [['update_time'], 'safe'],
  48. [['open_id', 'nick_name', 'avatar_url', 'city', 'province', 'country'], 'string', 'max' => 255],
  49. [['create_time'], 'string', 'max' => 20],
  50. [['open_id'], 'unique'],
  51. ];
  52. }
  53. /**
  54. * @inheritdoc
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'id' => 'ID',
  60. 'open_id' => 'Open ID',
  61. 'create_time' => 'Create Time',
  62. 'update_time' => 'Update Time',
  63. 'nick_name' => 'Nick Name',
  64. 'avatar_url' => 'Avatar Url',
  65. 'gender' => 'Gender',
  66. 'city' => 'City',
  67. 'province' => 'Province',
  68. 'country' => 'Country',
  69. ];
  70. }
  71. }