@@ -79,6 +79,21 @@ const Customization = t.model('Customization', {
7979 // ...
8080} )
8181
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+
8297export const User = t . model ( 'User' , {
8398 // identifier is desiged to be immutable, this id would be updated when login
8499 /* id: t.optional(t.string, ''), */
@@ -96,18 +111,7 @@ export const User = t.model('User', {
96111 workBackgrounds : t . optional ( t . array ( WorkBackground ) , [ ] ) ,
97112 sex : t . maybeNull ( t . string ) ,
98113 // 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 , { } ) ,
111115
112116 fromGithub : t . optional ( t . boolean , false ) ,
113117 /* fromWeixin: t.optional(t.boolean, false), */
0 commit comments