@@ -79,6 +79,21 @@ const Customization = t.model('Customization', {
79
79
// ...
80
80
} )
81
81
82
+ const UserSocial = t . model ( 'UserSocial' , {
83
+ qq :t . maybeNull ( t . string ) ,
84
+ weibo :t . maybeNull ( t . string ) ,
85
+ weichat :t . maybeNull ( t . string ) ,
86
+ github :t . maybeNull ( t . string ) ,
87
+ zhihu :t . maybeNull ( t . string ) ,
88
+ douban :t . maybeNull ( t . string ) ,
89
+ twitter :t . maybeNull ( t . string ) ,
90
+ facebook :t . maybeNull ( t . string ) ,
91
+ dribble :t . maybeNull ( t . string ) ,
92
+ instagram :t . maybeNull ( t . string ) ,
93
+ pinterest :t . maybeNull ( t . string ) ,
94
+ huaban :t . maybeNull ( t . string ) ,
95
+ } )
96
+
82
97
export const User = t . model ( 'User' , {
83
98
// identifier is desiged to be immutable, this id would be updated when login
84
99
/* id: t.optional(t.string, ''), */
@@ -96,18 +111,7 @@ export const User = t.model('User', {
96
111
workBackgrounds :t . optional ( t . array ( WorkBackground ) , [ ] ) ,
97
112
sex :t . maybeNull ( t . string ) ,
98
113
// social
99
- github :t . maybeNull ( t . string ) ,
100
- zhihu :t . maybeNull ( t . string ) ,
101
- douban :t . maybeNull ( t . string ) ,
102
- twitter :t . maybeNull ( t . string ) ,
103
- facebook :t . maybeNull ( t . string ) ,
104
- dribble :t . maybeNull ( t . string ) ,
105
- instagram :t . maybeNull ( t . string ) ,
106
- pinterest :t . maybeNull ( t . string ) ,
107
- huaban :t . maybeNull ( t . string ) ,
108
- qq :t . maybeNull ( t . string ) ,
109
- weichat :t . maybeNull ( t . string ) ,
110
- weibo :t . maybeNull ( t . string ) ,
114
+ social :t . optional ( UserSocial , { } ) ,
111
115
112
116
fromGithub :t . optional ( t . boolean , false ) ,
113
117
/* fromWeixin: t.optional(t.boolean, false), */