Compare commits
No commits in common. "bd0e039e7a46df79fb94297d11ddb0eee40a2e6b" and "c439e1bb425beb08825efa65c6654f513c20666c" have entirely different histories.
bd0e039e7a
...
c439e1bb42
|
|
@ -89,6 +89,63 @@
|
||||||
<None Include="..\.editorconfig" Link=".editorconfig" />
|
<None Include="..\.editorconfig" Link=".editorconfig" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\AdminAddUser_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\AdminResetUser_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\AdminResetUser.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialSiteSurveyReject_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialDoctorExistJoin.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialUserExistJoin.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\AdminAddUser.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialDoctorFirstJoin_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\SubjectEnrollConfirmOrPDProgress.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialUserFirstJoin_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\UserOptCommon_US.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\UserOptCommon.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Content Update="wwwroot\EmailTemplate\TrialUserFirstJoin.html">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Properties\PublishProfiles\" />
|
<Folder Include="Properties\PublishProfiles\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}为您添加了账户,账户信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
用户名: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
|
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
初始化账号信息
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0} ,
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation} has created an account for you. The account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
User ID: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
|
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Initialize account information
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}将您的账户密码已重置,账户信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
用户名: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
密码: {3}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0} ,
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation} has reset your account password, and the account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
User ID: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Password: {3}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
感谢您使用展影云平台。
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{0}。
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
Thank you for using {company abbreviation} Cloud System.
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{0}。
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目阅片相关工作。
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
项目编号: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验方案号: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验名称: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
用户名: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
系统登录地址:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
点击跳转
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0},
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
|
||||||
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1} , {2}).
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
Your account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
Trial ID: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Protocol ID: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Study Name: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
User ID: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Login URL:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Click to login
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
项目编号: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验方案号: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验名称: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
用户名: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
初始化账号信息
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0},
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
Your account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
Trial ID: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Protocol ID: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Study Name: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
User ID: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Initialize account information
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
您填写的中心调研表被驳回,详细信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
项目编号: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验方案号: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验名称: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
中心编号: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
中心名称: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
驳回原因: {6}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<a href='{7}' style='margin-left:60px;font-size:14px;padding: 10px;text-decoration: none;display:{8} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;'>
|
||||||
|
登陆并查看
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0} ,
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
The site survey form you filled in has been rejected. The details are as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
Trial ID: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Protocol ID: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Study Name: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Site ID: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Site name: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Reason for rejection: {6}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<a href='{7}' style='margin-left:60px;font-size:14px;padding: 10px;text-decoration: none;display:{8} ;height: 40px;width: 140px;background: #00D1B2;color:#fff;border-radius: 5px;line-height: 40px;text-align: center;margin-bottom: 100px;'>
|
||||||
|
Login and view
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
项目编号: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验方案号: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验名称: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
用户名: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
系统登录地址:
|
||||||
|
<a href='{6}' style='margin-left:5px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
点击跳转
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0},
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
|
||||||
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
Your account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
Trial ID: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Protocol ID: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Study Name: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
User ID: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Login URL:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Click to login
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
尊敬的 {0} ,您好:
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
项目编号: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验方案号: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
试验名称: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
用户名: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
角色: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
首次登陆前,请通过该链接修改您的账户信息:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
初始化账号信息
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0},
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
Your account information is as follows:
|
||||||
|
</div>
|
||||||
|
<span style="color: #00D1B2"></span>
|
||||||
|
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||||
|
<div>
|
||||||
|
Trial ID: {3}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Protocol ID: {2}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Study Name: {1}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
User ID: {4}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Role: {5}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Before logging in for the first time, please modify the account information through this link:
|
||||||
|
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||||
|
Initialize the account information
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
{0}您好,
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
感谢您使用展影云平台。
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{1},验证码是: <span style="font-weight:bold">{2}</span>。
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
请在3分钟内输入该验证码,进行后续操作
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>祝您顺利!</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='UTF-8'>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body style='font-family: 微软雅黑;padding: 0;margin: 0;'>
|
||||||
|
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||||
|
<div style='padding-top: 20px;'>
|
||||||
|
<div style='line-height: 40px;font-size: 18px'>
|
||||||
|
Dear {0},
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
{1}
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
The verification code is <span style="font-weight:bold">{2}</span>.
|
||||||
|
</div>
|
||||||
|
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||||
|
This code will expire in 3 minutes.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||||
|
<div>Best regards,</div>
|
||||||
|
<div style="font-size: 14px;">{company}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<!-- 表示启用了 NRT -->
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -65,24 +65,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
#region pgsql codefirst 配置 暂时屏蔽
|
|
||||||
//if (base.Database.IsNpgsql())
|
|
||||||
//{
|
|
||||||
// modelBuilder.HasPostgresExtension("uuid-ossp");
|
|
||||||
|
|
||||||
// //保证pgsql 生成的时间默认为timestamp 而不是 timestamp with time zone
|
|
||||||
// foreach (var entityType in modelBuilder.Model.GetEntityTypes())
|
|
||||||
// {
|
|
||||||
// foreach (var property in entityType.GetProperties())
|
|
||||||
// {
|
|
||||||
// if (property.ClrType == typeof(DateTime) || property.ClrType == typeof(DateTime?))
|
|
||||||
// {
|
|
||||||
// property.SetColumnType("timestamp without time zone");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
//遍历实体模型手动配置
|
//遍历实体模型手动配置
|
||||||
var typesToRegister = Assembly.GetExecutingAssembly().GetTypes().Where(q => q.GetInterface(typeof(IEntityTypeConfiguration<>).FullName) != null);
|
var typesToRegister = Assembly.GetExecutingAssembly().GetTypes().Where(q => q.GetInterface(typeof(IEntityTypeConfiguration<>).FullName) != null);
|
||||||
|
|
|
||||||
|
|
@ -1,355 +0,0 @@
|
||||||
<#@ template hostSpecific="true" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore.Design" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore.Relational" #>
|
|
||||||
<#@ assembly name="Microsoft.Extensions.DependencyInjection.Abstractions" #>
|
|
||||||
<#@ parameter name="Model" type="Microsoft.EntityFrameworkCore.Metadata.IModel" #>
|
|
||||||
<#@ parameter name="Options" type="Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions" #>
|
|
||||||
<#@ parameter name="NamespaceHint" type="System.String" #>
|
|
||||||
<#@ import namespace="System.Collections.Generic" #>
|
|
||||||
<#@ import namespace="System.Linq" #>
|
|
||||||
<#@ import namespace="System.Text" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore.Design" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore.Infrastructure" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore.Scaffolding" #>
|
|
||||||
<#@ import namespace="Microsoft.Extensions.DependencyInjection" #>
|
|
||||||
<#
|
|
||||||
if (!ProductInfo.GetVersion().StartsWith("8.0"))
|
|
||||||
{
|
|
||||||
Warning("Your templates were created using an older version of Entity Framework. Additional features and bug fixes may be available. See https://aka.ms/efcore-docs-updating-templates for more information.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var services = (IServiceProvider)Host;
|
|
||||||
var providerCode = services.GetRequiredService<IProviderConfigurationCodeGenerator>();
|
|
||||||
var annotationCodeGenerator = services.GetRequiredService<IAnnotationCodeGenerator>();
|
|
||||||
var code = services.GetRequiredService<ICSharpHelper>();
|
|
||||||
|
|
||||||
var usings = new List<string>
|
|
||||||
{
|
|
||||||
"System",
|
|
||||||
"System.Collections.Generic",
|
|
||||||
"Microsoft.EntityFrameworkCore"
|
|
||||||
};
|
|
||||||
|
|
||||||
if (NamespaceHint != Options.ModelNamespace
|
|
||||||
&& !string.IsNullOrEmpty(Options.ModelNamespace))
|
|
||||||
{
|
|
||||||
usings.Add(Options.ModelNamespace);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(NamespaceHint))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
namespace <#= NamespaceHint #>;
|
|
||||||
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
public partial class <#= Options.ContextName #> : DbContext
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
if (!Options.SuppressOnConfiguring)
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
public <#= Options.ContextName #>()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
public <#= Options.ContextName #>(DbContextOptions<<#= Options.ContextName #>> options)
|
|
||||||
: base(options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
<#
|
|
||||||
foreach (var entityType in Model.GetEntityTypes().Where(e => !e.IsSimpleManyToManyJoinEntityType()))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
public virtual DbSet<<#= entityType.Name #>> <#= entityType.GetDbSetName() #> { get; set; }
|
|
||||||
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Options.SuppressOnConfiguring)
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
||||||
<#
|
|
||||||
if (!Options.SuppressConnectionStringWarning)
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
var useProviderCall = providerCode.GenerateUseProvider(Options.ConnectionString);
|
|
||||||
usings.AddRange(useProviderCall.GetRequiredUsings());
|
|
||||||
#>
|
|
||||||
=> optionsBuilder<#= code.Fragment(useProviderCall, indent: 3) #>;
|
|
||||||
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
#>
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
var anyConfiguration = false;
|
|
||||||
|
|
||||||
var modelFluentApiCalls = Model.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (modelFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(modelFluentApiCalls.GetRequiredUsings());
|
|
||||||
#>
|
|
||||||
modelBuilder<#= code.Fragment(modelFluentApiCalls, indent: 3) #>;
|
|
||||||
<#
|
|
||||||
anyConfiguration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder mainEnvironment;
|
|
||||||
foreach (var entityType in Model.GetEntityTypes().Where(e => !e.IsSimpleManyToManyJoinEntityType()))
|
|
||||||
{
|
|
||||||
// Save all previously generated code, and start generating into a new temporary environment
|
|
||||||
mainEnvironment = GenerationEnvironment;
|
|
||||||
GenerationEnvironment = new StringBuilder();
|
|
||||||
|
|
||||||
if (anyConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
|
|
||||||
var anyEntityTypeConfiguration = false;
|
|
||||||
#>
|
|
||||||
modelBuilder.Entity<<#= entityType.Name #>>(entity =>
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
var key = entityType.FindPrimaryKey();
|
|
||||||
if (key != null)
|
|
||||||
{
|
|
||||||
var keyFluentApiCalls = key.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (keyFluentApiCalls != null
|
|
||||||
|| (!key.IsHandledByConvention() && !Options.UseDataAnnotations))
|
|
||||||
{
|
|
||||||
if (keyFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(keyFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity.HasKey(<#= code.Lambda(key.Properties, "e") #>)<#= code.Fragment(keyFluentApiCalls, indent: 4) #>;
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var entityTypeFluentApiCalls = entityType.GetFluentApiCalls(annotationCodeGenerator)
|
|
||||||
?.FilterChain(c => !(Options.UseDataAnnotations && c.IsHandledByDataAnnotations));
|
|
||||||
if (entityTypeFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(entityTypeFluentApiCalls.GetRequiredUsings());
|
|
||||||
|
|
||||||
if (anyEntityTypeConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity<#= code.Fragment(entityTypeFluentApiCalls, indent: 4) #>;
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var index in entityType.GetIndexes()
|
|
||||||
.Where(i => !(Options.UseDataAnnotations && i.IsHandledByDataAnnotations(annotationCodeGenerator))))
|
|
||||||
{
|
|
||||||
if (anyEntityTypeConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
|
|
||||||
var indexFluentApiCalls = index.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (indexFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(indexFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity.HasIndex(<#= code.Lambda(index.Properties, "e") #>, <#= code.Literal(index.GetDatabaseName()) #>)<#= code.Fragment(indexFluentApiCalls, indent: 4) #>;
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var firstProperty = true;
|
|
||||||
foreach (var property in entityType.GetProperties())
|
|
||||||
{
|
|
||||||
var propertyFluentApiCalls = property.GetFluentApiCalls(annotationCodeGenerator)
|
|
||||||
?.FilterChain(c => !(Options.UseDataAnnotations && c.IsHandledByDataAnnotations)
|
|
||||||
&& !(c.Method == "IsRequired" && Options.UseNullableReferenceTypes && !property.ClrType.IsValueType));
|
|
||||||
if (propertyFluentApiCalls == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
usings.AddRange(propertyFluentApiCalls.GetRequiredUsings());
|
|
||||||
|
|
||||||
if (anyEntityTypeConfiguration && firstProperty)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity.Property(e => e.<#= property.Name #>)<#= code.Fragment(propertyFluentApiCalls, indent: 4) #>;
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
firstProperty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var foreignKey in entityType.GetForeignKeys())
|
|
||||||
{
|
|
||||||
var foreignKeyFluentApiCalls = foreignKey.GetFluentApiCalls(annotationCodeGenerator)
|
|
||||||
?.FilterChain(c => !(Options.UseDataAnnotations && c.IsHandledByDataAnnotations));
|
|
||||||
if (foreignKeyFluentApiCalls == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
usings.AddRange(foreignKeyFluentApiCalls.GetRequiredUsings());
|
|
||||||
|
|
||||||
if (anyEntityTypeConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity.HasOne(d => d.<#= foreignKey.DependentToPrincipal.Name #>).<#= foreignKey.IsUnique ? "WithOne" : "WithMany" #>(<#= foreignKey.PrincipalToDependent != null ? $"p => p.{foreignKey.PrincipalToDependent.Name}" : "" #>)<#= code.Fragment(foreignKeyFluentApiCalls, indent: 4) #>;
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var skipNavigation in entityType.GetSkipNavigations().Where(n => n.IsLeftNavigation()))
|
|
||||||
{
|
|
||||||
if (anyEntityTypeConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
|
|
||||||
var left = skipNavigation.ForeignKey;
|
|
||||||
var leftFluentApiCalls = left.GetFluentApiCalls(annotationCodeGenerator, useStrings: true);
|
|
||||||
var right = skipNavigation.Inverse.ForeignKey;
|
|
||||||
var rightFluentApiCalls = right.GetFluentApiCalls(annotationCodeGenerator, useStrings: true);
|
|
||||||
var joinEntityType = skipNavigation.JoinEntityType;
|
|
||||||
|
|
||||||
if (leftFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(leftFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rightFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(rightFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
entity.HasMany(d => d.<#= skipNavigation.Name #>).WithMany(p => p.<#= skipNavigation.Inverse.Name #>)
|
|
||||||
.UsingEntity<Dictionary<string, object>>(
|
|
||||||
<#= code.Literal(joinEntityType.Name) #>,
|
|
||||||
r => r.HasOne<<#= right.PrincipalEntityType.Name #>>().WithMany()<#= code.Fragment(rightFluentApiCalls, indent: 6) #>,
|
|
||||||
l => l.HasOne<<#= left.PrincipalEntityType.Name #>>().WithMany()<#= code.Fragment(leftFluentApiCalls, indent: 6) #>,
|
|
||||||
j =>
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
var joinKey = joinEntityType.FindPrimaryKey();
|
|
||||||
var joinKeyFluentApiCalls = joinKey.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
|
|
||||||
if (joinKeyFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(joinKeyFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
j.HasKey(<#= code.Arguments(joinKey.Properties.Select(e => e.Name)) #>)<#= code.Fragment(joinKeyFluentApiCalls, indent: 7) #>;
|
|
||||||
<#
|
|
||||||
var joinEntityTypeFluentApiCalls = joinEntityType.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (joinEntityTypeFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(joinEntityTypeFluentApiCalls.GetRequiredUsings());
|
|
||||||
#>
|
|
||||||
j<#= code.Fragment(joinEntityTypeFluentApiCalls, indent: 7) #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var index in joinEntityType.GetIndexes())
|
|
||||||
{
|
|
||||||
var indexFluentApiCalls = index.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (indexFluentApiCalls != null)
|
|
||||||
{
|
|
||||||
usings.AddRange(indexFluentApiCalls.GetRequiredUsings());
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
j.HasIndex(<#= code.Literal(index.Properties.Select(e => e.Name).ToArray()) #>, <#= code.Literal(index.GetDatabaseName()) #>)<#= code.Fragment(indexFluentApiCalls, indent: 7) #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var property in joinEntityType.GetProperties())
|
|
||||||
{
|
|
||||||
var propertyFluentApiCalls = property.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
if (propertyFluentApiCalls == null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
usings.AddRange(propertyFluentApiCalls.GetRequiredUsings());
|
|
||||||
#>
|
|
||||||
j.IndexerProperty<<#= code.Reference(property.ClrType) #>>(<#= code.Literal(property.Name) #>)<#= code.Fragment(propertyFluentApiCalls, indent: 7) #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
});
|
|
||||||
<#
|
|
||||||
anyEntityTypeConfiguration = true;
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
});
|
|
||||||
<#
|
|
||||||
// If any signicant code was generated, append it to the main environment
|
|
||||||
if (anyEntityTypeConfiguration)
|
|
||||||
{
|
|
||||||
mainEnvironment.Append(GenerationEnvironment);
|
|
||||||
anyConfiguration = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Resume generating code into the main environment
|
|
||||||
GenerationEnvironment = mainEnvironment;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var sequence in Model.GetSequences())
|
|
||||||
{
|
|
||||||
var needsType = sequence.Type != typeof(long);
|
|
||||||
var needsSchema = !string.IsNullOrEmpty(sequence.Schema) && sequence.Schema != sequence.Model.GetDefaultSchema();
|
|
||||||
var sequenceFluentApiCalls = sequence.GetFluentApiCalls(annotationCodeGenerator);
|
|
||||||
#>
|
|
||||||
modelBuilder.HasSequence<#= needsType ? $"<{code.Reference(sequence.Type)}>" : "" #>(<#= code.Literal(sequence.Name) #><#= needsSchema ? $", {code.Literal(sequence.Schema)}" : "" #>)<#= code.Fragment(sequenceFluentApiCalls, indent: 3) #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
if (anyConfiguration)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
OnModelCreatingPartial(modelBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
|
||||||
}
|
|
||||||
<#
|
|
||||||
mainEnvironment = GenerationEnvironment;
|
|
||||||
GenerationEnvironment = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer()))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
using <#= ns #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteLine("");
|
|
||||||
|
|
||||||
GenerationEnvironment.Append(mainEnvironment);
|
|
||||||
#>
|
|
||||||
|
|
@ -1,169 +0,0 @@
|
||||||
<#@ template hostSpecific="true" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore.Design" #>
|
|
||||||
<#@ assembly name="Microsoft.EntityFrameworkCore.Relational" #>
|
|
||||||
<#@ assembly name="Microsoft.Extensions.DependencyInjection.Abstractions" #>
|
|
||||||
<#@ parameter name="EntityType" type="Microsoft.EntityFrameworkCore.Metadata.IEntityType" #>
|
|
||||||
<#@ parameter name="Options" type="Microsoft.EntityFrameworkCore.Scaffolding.ModelCodeGenerationOptions" #>
|
|
||||||
<#@ parameter name="NamespaceHint" type="System.String" #>
|
|
||||||
<#@ import namespace="System.Collections.Generic" #>
|
|
||||||
<#@ import namespace="System.ComponentModel.DataAnnotations" #>
|
|
||||||
<#@ import namespace="System.Linq" #>
|
|
||||||
<#@ import namespace="System.Text" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore" #>
|
|
||||||
<#@ import namespace="Microsoft.EntityFrameworkCore.Design" #>
|
|
||||||
<#@ import namespace="Microsoft.Extensions.DependencyInjection" #>
|
|
||||||
<#
|
|
||||||
if (EntityType.IsSimpleManyToManyJoinEntityType())
|
|
||||||
{
|
|
||||||
// Don't scaffold these
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
var services = (IServiceProvider)Host;
|
|
||||||
var annotationCodeGenerator = services.GetRequiredService<IAnnotationCodeGenerator>();
|
|
||||||
var code = services.GetRequiredService<ICSharpHelper>();
|
|
||||||
|
|
||||||
var usings = new List<string>
|
|
||||||
{
|
|
||||||
"System",
|
|
||||||
"System.Collections.Generic"
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Options.UseDataAnnotations)
|
|
||||||
{
|
|
||||||
usings.Add("System.ComponentModel.DataAnnotations");
|
|
||||||
usings.Add("System.ComponentModel.DataAnnotations.Schema");
|
|
||||||
usings.Add("Microsoft.EntityFrameworkCore");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(NamespaceHint))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
namespace <#= NamespaceHint #>;
|
|
||||||
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(EntityType.GetComment()))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
[comment("<#= code.XmlComment(EntityType.GetComment()) #>")]
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Options.UseDataAnnotations)
|
|
||||||
{
|
|
||||||
foreach (var dataAnnotation in EntityType.GetDataAnnotations(annotationCodeGenerator))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
<#= code.Fragment(dataAnnotation) #>
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
public partial class <#= EntityType.Name #>
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
var firstProperty = true;
|
|
||||||
foreach (var property in EntityType.GetProperties().OrderBy(p => p.GetColumnOrder() ?? -1))
|
|
||||||
{
|
|
||||||
if (!firstProperty)
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(property.GetComment()))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
[Comment(" <#= code.XmlComment(property.GetComment()) #>")]
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Options.UseDataAnnotations)
|
|
||||||
{
|
|
||||||
var dataAnnotations = property.GetDataAnnotations(annotationCodeGenerator)
|
|
||||||
.Where(a => !(a.Type == typeof(RequiredAttribute) && Options.UseNullableReferenceTypes && !property.ClrType.IsValueType));
|
|
||||||
foreach (var dataAnnotation in dataAnnotations)
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
<#= code.Fragment(dataAnnotation) #>
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
usings.AddRange(code.GetRequiredUsings(property.ClrType));
|
|
||||||
|
|
||||||
var needsNullable = Options.UseNullableReferenceTypes && property.IsNullable && !property.ClrType.IsValueType;
|
|
||||||
var needsInitializer = Options.UseNullableReferenceTypes && !property.IsNullable && !property.ClrType.IsValueType;
|
|
||||||
#>
|
|
||||||
public <#= code.Reference(property.ClrType) #><#= needsNullable ? "?" : "" #> <#= property.Name #> { get; set; }<#= needsInitializer ? " = null!;" : "" #>
|
|
||||||
<#
|
|
||||||
firstProperty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var navigation in EntityType.GetNavigations())
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
|
|
||||||
if (Options.UseDataAnnotations)
|
|
||||||
{
|
|
||||||
foreach (var dataAnnotation in navigation.GetDataAnnotations(annotationCodeGenerator))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
<#= code.Fragment(dataAnnotation) #>
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var targetType = navigation.TargetEntityType.Name;
|
|
||||||
if (navigation.IsCollection)
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
public virtual ICollection<<#= targetType #>> <#= navigation.Name #> { get; set; } = new List<<#= targetType #>>();
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var needsNullable = Options.UseNullableReferenceTypes && !(navigation.ForeignKey.IsRequired && navigation.IsOnDependent);
|
|
||||||
var needsInitializer = Options.UseNullableReferenceTypes && navigation.ForeignKey.IsRequired && navigation.IsOnDependent;
|
|
||||||
#>
|
|
||||||
public virtual <#= targetType #><#= needsNullable ? "?" : "" #> <#= navigation.Name #> { get; set; }<#= needsInitializer ? " = null!;" : "" #>
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var skipNavigation in EntityType.GetSkipNavigations())
|
|
||||||
{
|
|
||||||
WriteLine("");
|
|
||||||
|
|
||||||
if (Options.UseDataAnnotations)
|
|
||||||
{
|
|
||||||
foreach (var dataAnnotation in skipNavigation.GetDataAnnotations(annotationCodeGenerator))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
<#= code.Fragment(dataAnnotation) #>
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
public virtual ICollection<<#= skipNavigation.TargetEntityType.Name #>> <#= skipNavigation.Name #> { get; set; } = new List<<#= skipNavigation.TargetEntityType.Name #>>();
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
#>
|
|
||||||
}
|
|
||||||
<#
|
|
||||||
var previousOutput = GenerationEnvironment;
|
|
||||||
GenerationEnvironment = new StringBuilder();
|
|
||||||
|
|
||||||
foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer()))
|
|
||||||
{
|
|
||||||
#>
|
|
||||||
using <#= ns #>;
|
|
||||||
<#
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteLine("");
|
|
||||||
|
|
||||||
GenerationEnvironment.Append(previousOutput);
|
|
||||||
#>
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<!-- 表示启用了 NRT -->
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
||||||
|
|
@ -101,7 +98,6 @@
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.8" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Test.PGModelFolder;
|
|
||||||
|
|
||||||
public partial class PGContext : DbContext
|
|
||||||
{
|
|
||||||
public PGContext()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public PGContext(DbContextOptions<PGContext> options)
|
|
||||||
: base(options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual DbSet<Subject> Subjects { get; set; }
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
||||||
=> optionsBuilder.UseNpgsql("Host=106.14.89.110;Port=5432;Username=sa;Password=pgsql_pwd;Database=Test6_PG");
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (base.Database.IsNpgsql())
|
|
||||||
{
|
|
||||||
modelBuilder.HasPostgresExtension("uuid-ossp");
|
|
||||||
|
|
||||||
//保证pgsql 生成的时间默认为timestamp 而不是 timestamp with time zone
|
|
||||||
foreach (var entityType in modelBuilder.Model.GetEntityTypes())
|
|
||||||
{
|
|
||||||
foreach (var property in entityType.GetProperties())
|
|
||||||
{
|
|
||||||
if (property.ClrType == typeof(DateTime) || property.ClrType == typeof(DateTime?))
|
|
||||||
{
|
|
||||||
property.SetColumnType("timestamp without time zone");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OnModelCreatingPartial(modelBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Test.PGModelFolder;
|
|
||||||
|
|
||||||
public partial class Subject
|
|
||||||
{
|
|
||||||
public Guid Id { get; set; }
|
|
||||||
|
|
||||||
[MaxLength(200)]
|
|
||||||
public string LastName { get; set; }
|
|
||||||
|
|
||||||
public int StudyCount { get; set; }
|
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
|
||||||
|
|
||||||
public DateTime? BirthDate { get; set; }
|
|
||||||
|
|
||||||
public DateTime? FirstGiveMedicineTime { get; set; }
|
|
||||||
|
|
||||||
public bool IsMissingImages { get; set; }
|
|
||||||
|
|
||||||
public string MedicalNo { get; set; }
|
|
||||||
[MaxLength(200)]
|
|
||||||
public string ShortName { get; set; }
|
|
||||||
|
|
||||||
public string Reason { get; set; }
|
|
||||||
|
|
||||||
public Guid? FinalSubjectVisitId { get; set; }
|
|
||||||
|
|
||||||
public string Height { get; set; }
|
|
||||||
|
|
||||||
[Comment("subject 编号")]
|
|
||||||
[MaxLength(100)]
|
|
||||||
public string Code { get; set; }
|
|
||||||
|
|
||||||
public int? Age { get; set; }
|
|
||||||
|
|
||||||
public string Modalities { get; set; }
|
|
||||||
|
|
||||||
public DateTime? SignDate { get; set; }
|
|
||||||
|
|
||||||
public DateTime UpdateTime { get; set; }
|
|
||||||
|
|
||||||
public Guid CreateUserId { get; set; }
|
|
||||||
|
|
||||||
public string Sex { get; set; }
|
|
||||||
|
|
||||||
public Guid? LatestSubjectVisitId { get; set; }
|
|
||||||
|
|
||||||
public bool IsEnrollmentConfirm { get; set; }
|
|
||||||
|
|
||||||
public Guid? DeleteUserId { get; set; }
|
|
||||||
|
|
||||||
public string Weight { get; set; }
|
|
||||||
|
|
||||||
public DateTime? OutEnrollmentTime { get; set; }
|
|
||||||
|
|
||||||
public DateTime CreateTime { get; set; }
|
|
||||||
|
|
||||||
public string FirstName { get; set; }
|
|
||||||
|
|
||||||
public bool IsUrgent { get; set; }
|
|
||||||
|
|
||||||
public long Status { get; set; }
|
|
||||||
|
|
||||||
public DateTime? VisitOverTime { get; set; }
|
|
||||||
|
|
||||||
public Guid UpdateUserId { get; set; }
|
|
||||||
|
|
||||||
public bool IsDeleted { get; set; }
|
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public bool IsEnrollment { get; set; }
|
|
||||||
|
|
||||||
public bool IsAssignDoctorUser { get; set; }
|
|
||||||
|
|
||||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
|
||||||
|
|
||||||
public Guid TrialSiteId { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -51,7 +51,7 @@ partial class Program
|
||||||
|
|
||||||
|
|
||||||
// 要生成的表名数组
|
// 要生成的表名数组
|
||||||
var tableNames = new List<string> { /*"Subject", "Order"*/ };
|
var tableNames = new List<string> { "Subject"/*, "Order"*/ };
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"ConnectionStrings": {
|
|
||||||
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue