웹 타입 설정패널 분리
This commit is contained in:
@@ -2,6 +2,42 @@ import { Request, Response } from "express";
|
||||
import { PrismaClient } from "@prisma/client";
|
||||
import { AuthenticatedRequest } from "../types/auth";
|
||||
|
||||
// 임시 타입 확장 (Prisma Client 재생성 전까지)
|
||||
interface WebTypeStandardCreateData {
|
||||
web_type: string;
|
||||
type_name: string;
|
||||
type_name_eng?: string;
|
||||
description?: string;
|
||||
category?: string;
|
||||
component_name?: string;
|
||||
config_panel?: string;
|
||||
default_config?: any;
|
||||
validation_rules?: any;
|
||||
default_style?: any;
|
||||
input_properties?: any;
|
||||
sort_order?: number;
|
||||
is_active?: string;
|
||||
created_by?: string;
|
||||
updated_by?: string;
|
||||
}
|
||||
|
||||
interface WebTypeStandardUpdateData {
|
||||
type_name?: string;
|
||||
type_name_eng?: string;
|
||||
description?: string;
|
||||
category?: string;
|
||||
component_name?: string;
|
||||
config_panel?: string;
|
||||
default_config?: any;
|
||||
validation_rules?: any;
|
||||
default_style?: any;
|
||||
input_properties?: any;
|
||||
sort_order?: number;
|
||||
is_active?: string;
|
||||
updated_by?: string;
|
||||
updated_date?: Date;
|
||||
}
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
export class WebTypeStandardController {
|
||||
@@ -91,6 +127,7 @@ export class WebTypeStandardController {
|
||||
description,
|
||||
category = "input",
|
||||
component_name = "TextWidget",
|
||||
config_panel,
|
||||
default_config,
|
||||
validation_rules,
|
||||
default_style,
|
||||
@@ -127,6 +164,7 @@ export class WebTypeStandardController {
|
||||
description,
|
||||
category,
|
||||
component_name,
|
||||
config_panel,
|
||||
default_config,
|
||||
validation_rules,
|
||||
default_style,
|
||||
@@ -135,7 +173,7 @@ export class WebTypeStandardController {
|
||||
is_active,
|
||||
created_by: req.user?.userId || "system",
|
||||
updated_by: req.user?.userId || "system",
|
||||
},
|
||||
} as WebTypeStandardCreateData,
|
||||
});
|
||||
|
||||
return res.status(201).json({
|
||||
@@ -163,6 +201,7 @@ export class WebTypeStandardController {
|
||||
description,
|
||||
category,
|
||||
component_name,
|
||||
config_panel,
|
||||
default_config,
|
||||
validation_rules,
|
||||
default_style,
|
||||
@@ -191,6 +230,7 @@ export class WebTypeStandardController {
|
||||
description,
|
||||
category,
|
||||
component_name,
|
||||
config_panel,
|
||||
default_config,
|
||||
validation_rules,
|
||||
default_style,
|
||||
@@ -199,7 +239,7 @@ export class WebTypeStandardController {
|
||||
is_active,
|
||||
updated_by: req.user?.userId || "system",
|
||||
updated_date: new Date(),
|
||||
},
|
||||
} as WebTypeStandardUpdateData,
|
||||
});
|
||||
|
||||
return res.json({
|
||||
|
||||
Reference in New Issue
Block a user