当前位置: 首页>>代码示例>>Python>>正文


Python User.imagePath方法代码示例

本文整理汇总了Python中DoctorSpring.models.User.imagePath方法的典型用法代码示例。如果您正苦于以下问题:Python User.imagePath方法的具体用法?Python User.imagePath怎么用?Python User.imagePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DoctorSpring.models.User的用法示例。


在下文中一共展示了User.imagePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_addDoctor

# 需要导入模块: from DoctorSpring.models import User [as 别名]
# 或者: from DoctorSpring.models.User import imagePath [as 别名]
    def test_addDoctor(self):
        new_user_1 = User('印弘',"1111111111", "123456")
        new_user_1.email = "[email protected]"
        new_user_1.phone = "111111111111"
        new_user_1.type = UserStatus.doctor
        new_user_1.imagePath = config.AVATAR_PREFIX+'avatar/yinhong-xj.png'
        User.save(new_user_1)

        new_doctor_1 = Doctor(new_user_1.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_userrole = UserRole(new_user_1.id, RoleId.Doctor)
        UserRole.save(new_userrole)




        new_user_2 = User('宦怡',"22222222222", "123456")
        new_user_2.email = "[email protected]"
        new_user_2.phone = "22222222222"
        new_user_2.imagePath = config.AVATAR_PREFIX+'avatar/huanyi-xj.jpg'

        new_user_2.type = UserStatus.doctor
        User.save(new_user_2)

        new_doctor_2 = Doctor(new_user_2.id)
        new_doctor_2.identityPhone = "029-12345567"
        new_doctor_2.username = "宦怡"
        new_doctor_2.diagnoseCount = 8
        new_doctor_2.feedbackCount = 3

        new_doctor_2.hospitalId = 1
        new_doctor_2.departmentId = 1
        new_doctor_2.title = "主任医师"
        new_doctor_2.status = 0
        new_doctor_2.goodFeedbackCount = 2

        Doctor.save(new_doctor_2)
        new_doctor2skill_1_2 = Doctor2Skill(new_doctor_2.id,2)
        Doctor2Skill.save(new_doctor2skill_1_2)
        new_userrole2 = UserRole(new_user_2.id, RoleId.Doctor)
        UserRole.save(new_userrole2)

        new_user_3 = User('张劲松',"33333333333", "123456")
        new_user_3.email = "[email protected]"
        new_user_3.phone = "33333333333"
        new_user_3.type = UserStatus.doctor
        new_user_3.imagePath = config.AVATAR_PREFIX+'avatar/zhangjinsong-xj.jpg'

        User.save(new_user_3)

        new_doctor_3 = Doctor(new_user_3.id)
        new_doctor_3.identityPhone = "029-12345567"
        new_doctor_3.username = "张劲松"
        new_doctor_3.diagnoseCount = 9
        new_doctor_3.feedbackCount = 4

        new_doctor_3.hospitalId = 1
        new_doctor_3.departmentId = 1
        new_doctor_3.title = "副主任医师"
        new_doctor_3.status = 0
        new_doctor_3.goodFeedbackCount = 3

        Doctor.save(new_doctor_3)
        new_doctor2skill_1_3 = Doctor2Skill(new_doctor_3.id,3)
        Doctor2Skill.save(new_doctor2skill_1_3)
        new_userrole3 = UserRole(new_user_3.id, RoleId.Doctor)
        UserRole.save(new_userrole3)

        #doctor 4
        new_user_4 = User('孙立军',"88888888888", "123456")
        new_user_4.email = "[email protected]"
        new_user_4.phone = "88888888888"
        new_user_4.type = UserStatus.doctor
        new_user_4.imagePath = config.AVATAR_PREFIX+'avatar/sunlijun-xj.jpg'

        User.save(new_user_4)

        new_doctor_4 = Doctor(new_user_4.id)
        new_doctor_4.identityPhone = "029-12345567"
        new_doctor_4.username = "孙立军"
        new_doctor_4.diagnoseCount = 9
        new_doctor_4.feedbackCount = 4

        new_doctor_4.hospitalId = 1
        new_doctor_4.departmentId = 1
        new_doctor_4.title = "主任医师"
        new_doctor_4.status = 0
#.........这里部分代码省略.........
开发者ID:LichuanLu,项目名称:redberry,代码行数:103,代码来源:real_model.py


注:本文中的DoctorSpring.models.User.imagePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。