Subversion Repositories SmartDukaan

Rev

Rev 2020 | Rev 2717 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2020 Rev 2641
Line 1... Line 1...
1
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress,\
1
from shop2020.thriftpy.model.v1.user.ttypes import Address as TAddress,\
2
    Phone as TPhone, SocialHandles as TSocialHandles, UserCommunication as TUserCommunication,\
2
    Phone as TPhone, SocialHandles as TSocialHandles, UserCommunication as TUserCommunication,\
3
    UserState as TUserState, User as TUser, Cart as TCart, Line as TLine, Sex as TSex,\
3
    UserState as TUserState, User as TUser, Cart as TCart, Line as TLine, Sex as TSex,\
4
    MasterAffiliate as TMasterAffiliate, Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog,\
4
    MasterAffiliate as TMasterAffiliate, Affiliate as TAffiliate, Tracker as TTracker, TrackLog as TTrackLog,\
5
    Promotion as TPromotion, Coupon as TCoupon
5
    Promotion as TPromotion, Coupon as TCoupon, UserNote as TUserNote
6
from shop2020.utils.Utils import to_java_date
6
from shop2020.utils.Utils import to_java_date
7
 
7
 
8
def to_t_address(address):
8
def to_t_address(address):
9
    t_address = TAddress()
9
    t_address = TAddress()
10
    t_address.id = address.id
10
    t_address.id = address.id
Line 205... Line 205...
205
        t_coupon.code = coupon.code
205
        t_coupon.code = coupon.code
206
        t_coupon.promotion_id = coupon.promotion_id
206
        t_coupon.promotion_id = coupon.promotion_id
207
        t_coupon.arguments = coupon.arguments
207
        t_coupon.arguments = coupon.arguments
208
    
208
    
209
    return t_coupon
209
    return t_coupon
-
 
210
 
-
 
211
def to_t_user_note(user_note):
-
 
212
    t_user_note = TUserNote()
-
 
213
    
-
 
214
    if user_note:
-
 
215
        t_user_note.user_id = user_note.user_id
-
 
216
        t_user_note.entity_id = user_note.entity_id
-
 
217
        t_user_note.slide_id = user_note.slide_id
-
 
218
        t_user_note.note = user_note.note
-
 
219
    
-
 
220
    return t_user_note
210
221