コード例 #1
0
ファイル: AuthType.php プロジェクト: aeshion/ZeroPHP
 public function __construct()
 {
     $this->definition = new ObjectType(array('name' => 'auth', 'description' => '用户认证表', 'fields' => function () {
         return ['id' => Types::id(), 'username' => Types::string(), 'email' => Types::email(), 'mobile' => Types::string(), 'status' => Types::int()];
     }));
 }
コード例 #2
0
ファイル: UserType.php プロジェクト: aeshion/ZeroPHP
 public function __construct()
 {
     $this->definition = new ObjectType(array('name' => 'user', 'description' => '用户综合信息', 'fields' => function () {
         return ['id' => Types::id(), 'username' => Types::string(), 'email' => Types::email(), 'mobile' => Types::string(), 'status' => Types::int(), 'nickname' => Types::string(), 'full_name' => Types::string(), 'first_name' => Types::string(), 'last_name' => Types::string(), 'birth_year' => Types::int(), 'birth_month' => Types::int(), 'birth_day' => Types::int(), 'avatar' => Types::url(), 'qq' => Types::string(), 'wechat' => Types::string(), 'weibo_name' => Types::string(), 'weibo_url' => Types::url(), 'country' => Types::string(), 'province' => Types::string(), 'city' => Types::string(), 'address' => Types::string(), 'language' => Types::string(), 'timezone' => Types::string(), 'slogan' => Types::string(), 'summary' => Types::string()];
     }));
 }