Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiDataServer
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yuyiDataServer
Commits
b02aa52f
Commit
b02aa52f
authored
Nov 26, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据库搭建
parent
b7d4d9b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
2 deletions
+2
-2
package-lock.json
package-lock.json
+0
-0
serverConfig.xml
serverConfig.xml
+1
-1
mysqlTableConfig.ts
src/config/mysqlTableConfig.ts
+0
-0
sqlModelBind.ts
src/model/sqlModelBind.ts
+1
-1
No files found.
package-lock.json
View file @
b02aa52f
This diff is collapsed.
Click to expand it.
serverConfig.xml
View file @
b02aa52f
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<mysqlPort>
3306
</mysqlPort>
<mysqlPort>
3306
</mysqlPort>
<mysqlUser>
root
</mysqlUser>
<mysqlUser>
root
</mysqlUser>
<mysqlPwd>
123456
</mysqlPwd>
<mysqlPwd>
123456
</mysqlPwd>
<dataBase>
y
fs
</dataBase>
.
<dataBase>
y
uyi
</dataBase>
.
<!-- 服务器mysql配置 -->
<!-- 服务器mysql配置 -->
<!-- <mysqlHost>127.0.0.1</mysqlHost>
<!-- <mysqlHost>127.0.0.1</mysqlHost>
<mysqlPort>3306</mysqlPort>
<mysqlPort>3306</mysqlPort>
...
...
src/config/mysqlTableConfig.ts
View file @
b02aa52f
This diff is collapsed.
Click to expand it.
src/model/sqlModelBind.ts
View file @
b02aa52f
...
@@ -15,7 +15,7 @@ export async function initMysqlModel() {
...
@@ -15,7 +15,7 @@ export async function initMysqlModel() {
let
schemaConf
=
{
let
schemaConf
=
{
freezeTableName
:
true
,
//true表示使用给定的表名,false表示模型名后加s作为表名
freezeTableName
:
true
,
//true表示使用给定的表名,false表示模型名后加s作为表名
timestamps
:
fals
e
//true表示给模型加上时间戳属性(createAt updateAt),false表示不带时间戳属性
timestamps
:
tru
e
//true表示给模型加上时间戳属性(createAt updateAt),false表示不带时间戳属性
};
};
let
model
=
mysqlDB
.
define
(
tableName
,
schema
,
schemaConf
);
let
model
=
mysqlDB
.
define
(
tableName
,
schema
,
schemaConf
);
...
...
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