Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
32dcc43a
Commit
32dcc43a
authored
Jul 13, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del: 多余代码
parent
bf916b64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
55 deletions
+0
-55
subsystem-deliver/app/base/db/impl/common/connection.js
+0
-55
No files found.
subsystem-deliver/app/base/db/impl/common/connection.js
View file @
32dcc43a
...
...
@@ -66,61 +66,6 @@ class DbFactory {
console
.
log
(
"init models...."
);
}
async
initRelations
()
{
// this.db.models.dataauth.belongsTo(this.db.models.user, { constraints: false, });
// /*建立用户和角色之间的关系*/
// this.db.models.user.belongsToMany(this.db.models.role, { as: "Roles", through: 'p_userrole', constraints: false, });
// this.db.models.role.belongsToMany(this.db.models.user, { as: "Users", through: 'p_userrole', constraints: false, });
/*组织机构自引用*/
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
//组织机构和角色是多对多关系,建立兼职岗位,给岗位赋予多个角色,从而同步修改用户的角色
//通过岗位接口去修改用户的角色
//this.db.models.role.belongsToMany(this.db.models.org,{through: this.db.models.orgrole,constraints: false,});
//this.db.models.org.belongsToMany(this.db.models.role,{through: this.db.models.orgrole,constraints: false,});
//组织机构和用户是1对多,
// this.db.models.user.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.user,{constraints: false,});
// this.db.models.user.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.role.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.role, { constraints: false, });
// this.db.models.app.belongsTo(this.db.models.user, { as: "creator", constraints: false, });
// this.db.models.user.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.role.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
// this.db.models.route.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.plugin.belongsTo(this.db.models.app, { constraints: false, });
// 商机表 1:1 方案表
this
.
db
.
models
.
scheme
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
,
});
this
.
db
.
models
.
bizopt
.
hasOne
(
this
.
db
.
models
.
scheme
,
{
constraints
:
false
,
});
// 交付单表 1:1 临时材料表
this
.
db
.
models
.
cacheinfo
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
cacheinfo
,
{
constraints
:
false
,
});
// 交付表 1:1 材料表
this
.
db
.
models
.
material
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
material
,
{
constraints
:
false
,
});
// 交付表 1:1 资质信息表
this
.
db
.
models
.
qualification
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
qualification
,
{
constraints
:
false
,
});
// 交付单表 1:n 年报信息表
this
.
db
.
models
.
deliver
.
hasMany
(
this
.
db
.
models
.
annualreport
,
{
constraints
:
false
})
}
//async getCon(){,用于使用替换table模型内字段数据使用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment