本文整理汇总了Python中DoctorSpring.models.User.name方法的典型用法代码示例。如果您正苦于以下问题:Python User.name方法的具体用法?Python User.name怎么用?Python User.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DoctorSpring.models.User
的用法示例。
在下文中一共展示了User.name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_addKefu
# 需要导入模块: from DoctorSpring.models import User [as 别名]
# 或者: from DoctorSpring.models.User import name [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)
示例2: test_addFenzhen
# 需要导入模块: from DoctorSpring.models import User [as 别名]
# 或者: from DoctorSpring.models.User import name [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)
示例3: test_addHospitalUser
# 需要导入模块: from DoctorSpring.models import User [as 别名]
# 或者: from DoctorSpring.models.User import name [as 别名]
def test_addHospitalUser(self):
new_user_1 = User('医院用户',"44444444444", "123456")
new_user_1.email = "[email protected]"
new_user_1.phone = "44444444444"
new_user_1.name = "医院用户"
new_user_1.type = UserStatus.doctor
User.save(new_user_1)
new_doctor_1 = Doctor(new_user_1.id)
new_doctor_1.username = "医院用户"
new_doctor_1.hospitalId = 1
new_doctor_1.status = 0
new_doctor_1.type = DoctorType.HospitalUser
Doctor.save(new_doctor_1)
new_userrole = UserRole(new_user_1.id, RoleId.HospitalUser)
UserRole.save(new_userrole)
示例4: test_addSuperUser
# 需要导入模块: from DoctorSpring.models import User [as 别名]
# 或者: from DoctorSpring.models.User import name [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)