고객사 관리및 설정값 수정정
This commit is contained in:
parent
6dfdd50c9e
commit
7b90ebd0d1
@ -44,13 +44,12 @@ const initializeServer = async () => {
|
||||
// 데이터베이스 연결 대기
|
||||
await waitForDatabase();
|
||||
|
||||
// // 개발 환경에서만 데이터베이스 동기화
|
||||
// if (process.env.NODE_ENV !== "production") {
|
||||
// await sequelize.sync({ force: true });
|
||||
// // await sequelize.sync({ alter: true });
|
||||
// logger.info("Database synchronized.");
|
||||
// await require("./utils/createInitialAdmin")();
|
||||
// }
|
||||
// 개발 환경에서만 데이터베이스 동기화
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
await sequelize.sync({ alert: true });
|
||||
logger.info("Database synchronized.");
|
||||
//await require("./utils/createInitialAdmin")();
|
||||
}
|
||||
|
||||
// 서버 시작
|
||||
const port = config.port;
|
||||
|
55
plm-api/src/models/OemMng.js
Normal file
55
plm-api/src/models/OemMng.js
Normal file
@ -0,0 +1,55 @@
|
||||
// models/OemMng.js
|
||||
|
||||
const { Model, DataTypes } = require("sequelize");
|
||||
|
||||
class OemMng extends Model {
|
||||
static init(sequelize) {
|
||||
super.init(
|
||||
{
|
||||
id: {
|
||||
type: DataTypes.UUID,
|
||||
defaultValue: DataTypes.UUIDV4,
|
||||
primaryKey: true,
|
||||
},
|
||||
oem_code: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: true,
|
||||
},
|
||||
oem_name: {
|
||||
type: DataTypes.STRING(64),
|
||||
allowNull: true,
|
||||
},
|
||||
writer: {
|
||||
type: DataTypes.STRING(32),
|
||||
allowNull: true,
|
||||
},
|
||||
regdate: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: true,
|
||||
},
|
||||
status: {
|
||||
type: DataTypes.STRING(32),
|
||||
allowNull: true,
|
||||
},
|
||||
oem_no: {
|
||||
type: DataTypes.STRING(32),
|
||||
allowNull: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
modelName: 'OemMng',
|
||||
tableName: 'oem_mng1',
|
||||
timestamps: true,
|
||||
indexes: [
|
||||
{
|
||||
fields: ['id'],
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OemMng;
|
Loading…
Reference in New Issue
Block a user