當前位置: 首頁>>代碼示例>>Python>>正文


Python User.address方法代碼示例

本文整理匯總了Python中DoctorSpring.models.User.address方法的典型用法代碼示例。如果您正苦於以下問題:Python User.address方法的具體用法?Python User.address怎麽用?Python User.address使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DoctorSpring.models.User的用法示例。


在下文中一共展示了User.address方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_addKefu

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import address [as 別名]
    def test_addKefu(self):
        user=User('kefu','77777777777','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '77777777777'
        user.type = UserStatus.doctor
        user.name = "客服人員"
        User.save(user)

        new_userrole2 = UserRole(user.id, RoleId.Kefu)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:15,代碼來源:real_model.py

示例2: test_addFenzhen

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import address [as 別名]
    def test_addFenzhen(self):
        user=User('fenzhen','13426026573','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '13426026573'
        user.type = UserStatus.doctor
        user.name = "分診醫生"
        User.save(user)

        new_userrole2 = UserRole(user.id, RoleId.Admin)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:15,代碼來源:real_model.py

示例3: test_addPatient

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import address [as 別名]
 def test_addPatient(self):
     user=User('liclu','15210892443','123456')
     user.sex=0
     user.status=0
     user.email='[email protected]'
     user.address='四川省 通江縣'
     user.phone = '15210892443'
     User.save(user)
     patient=Patient()
     patient.gender=0
     patient.Name='程成'
     patient.status=0
     patient.userID=user.id
     Patient.save(patient)
     new_userrole = UserRole(user.id, RoleId.Patient)
     UserRole.save(new_userrole)
開發者ID:LichuanLu,項目名稱:redberry,代碼行數:18,代碼來源:real_model.py

示例4: test_addSuperUser

# 需要導入模塊: from DoctorSpring.models import User [as 別名]
# 或者: from DoctorSpring.models.User import address [as 別名]
    def test_addSuperUser(self):
        user=User('zhoufan','13426026573','123456')
        user.sex=0
        user.status=0
        user.email='[email protected]'
        user.address='四川省 通江縣'
        user.phone = '13426026573'
        user.type = UserStatus.doctor
        user.name = "張西"
        User.save(user)


        patient=Patient()
        patient.gender=0
        patient.Name='zf'
        patient.status=0
        patient.userID=user.id
        Patient.save(patient)
        new_userrole = UserRole(user.id, RoleId.Patient)
        UserRole.save(new_userrole)

        new_doctor_1 = Doctor(user.id)
        new_doctor_1.identityPhone = "029-12345567"
        new_doctor_1.username = "張西"
        new_doctor_1.diagnoseCount = 10
        new_doctor_1.feedbackCount = 5
        new_doctor_1.goodFeedbackCount = 5
        new_doctor_1.hospitalId = 1
        new_doctor_1.departmentId = 1
        new_doctor_1.title = "副主任醫師"
        new_doctor_1.status = 0


        Doctor.save(new_doctor_1)
        new_doctor2skill_1_1 = Doctor2Skill(new_doctor_1.id,1)
        Doctor2Skill.save(new_doctor2skill_1_1)
        new_userrole1 = UserRole(user.id, RoleId.Doctor)
        UserRole.save(new_userrole1)
        new_userrole2 = UserRole(user.id, RoleId.Admin)
        UserRole.save(new_userrole2)
開發者ID:LichuanLu,項目名稱:blueberry,代碼行數:42,代碼來源:real_model.py


注:本文中的DoctorSpring.models.User.address方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。