Subversion Repositories SmartDukaan

Rev

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

Rev 690 Rev 1583
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,\
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
from shop2020.utils.Utils import to_java_date
4
from shop2020.utils.Utils import to_java_date
5
 
5
 
6
def to_t_address(address):
6
def to_t_address(address):
7
    t_address = TAddress()
7
    t_address = TAddress()
Line 108... Line 108...
108
        t_line.estimate = line.estimate
108
        t_line.estimate = line.estimate
109
        t_line.createdOn = to_java_date(line.created_on)
109
        t_line.createdOn = to_java_date(line.created_on)
110
        t_line.updatedOn = to_java_date(line.updated_on)
110
        t_line.updatedOn = to_java_date(line.updated_on)
111
        t_line.lineStatus = line.line_status
111
        t_line.lineStatus = line.line_status
112
    return t_line
112
    return t_line
113
    
-
 
114
113
 
-
 
114
def to_t_user_communication(user_communication):
-
 
115
    t_user_communication = TUserCommunication()
-
 
116
    
-
 
117
    if user_communication:
-
 
118
        t_user_communication.id = user_communication.id
-
 
119
        t_user_communication.user_id = user_communication.user_id
-
 
120
        t_user_communication.communication_type = user_communication.communication_type
-
 
121
        t_user_communication.order_id = user_communication.order_id
-
 
122
        t_user_communication.airwaybill_no = user_communication.airwaybill_no
-
 
123
        t_user_communication.reply_to = user_communication.reply_to
-
 
124
        t_user_communication.product_name = user_communication.product_name
-
 
125
        t_user_communication.subject = user_communication.subject
-
 
126
        t_user_communication.message = user_communication.message
-
 
127
        t_user_communication.communication_timestamp = to_java_date(user_communication.communication_timestamp)
-
 
128
        
-
 
129
    return t_user_communication
-
 
130
115
131