mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-12-22 00:36:41 +02:00
сделал CreateFilesUpdateEveryColumn()
This commit is contained in:
parent
92a0e6d71f
commit
17ff7e25c7
@ -495,15 +495,15 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
||||
`
|
||||
|
||||
//заменим импорты
|
||||
//if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
DBConstantsURL := create_files.FindDBConstantsURL()
|
||||
TextCrud = create_files.AddImport(TextCrud, DBConstantsURL)
|
||||
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
DBConstantsURL := create_files.FindDBConstantsURL()
|
||||
TextCrud = create_files.AddImport(TextCrud, DBConstantsURL)
|
||||
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextCrud = create_files.AddImport(TextCrud, ModelTableURL)
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextCrud = create_files.AddImport(TextCrud, ModelTableURL)
|
||||
|
||||
//TextCrud = create_files.ConvertIdToAlias(TextCrud, Table1)
|
||||
//}
|
||||
//TextCrud = create_files.ConvertIdToAlias(TextCrud, Table1)
|
||||
}
|
||||
|
||||
//создание текста
|
||||
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextCrudUpdateFunc, Table1)
|
||||
|
@ -389,27 +389,27 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
||||
`
|
||||
|
||||
//заменим импорты
|
||||
//if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
ProtoURL := create_files.FindProtoURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ProtoURL)
|
||||
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
ProtoURL := create_files.FindProtoURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ProtoURL)
|
||||
|
||||
GRPCClientURL := create_files.FindGRPClientURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCClientURL)
|
||||
GRPCClientURL := create_files.FindGRPClientURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCClientURL)
|
||||
|
||||
GRPCConstantsURL := create_files.FindGRPCConstantsURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCConstantsURL)
|
||||
GRPCConstantsURL := create_files.FindGRPCConstantsURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCConstantsURL)
|
||||
|
||||
GRPC_NRPC_URL := create_files.Find_GRPC_NRPC_URL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPC_NRPC_URL)
|
||||
GRPC_NRPC_URL := create_files.Find_GRPC_NRPC_URL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPC_NRPC_URL)
|
||||
|
||||
NRPCClientURL := create_files.FindNRPClientURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, NRPCClientURL)
|
||||
NRPCClientURL := create_files.FindNRPClientURL()
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, NRPCClientURL)
|
||||
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ModelTableURL)
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ModelTableURL)
|
||||
|
||||
//TextGRPC_Client = create_files.ConvertIdToAlias(TextGRPC_Client, Table1)
|
||||
//}
|
||||
//TextGRPC_Client = create_files.ConvertIdToAlias(TextGRPC_Client, Table1)
|
||||
}
|
||||
|
||||
//создание текста
|
||||
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextGRPC_ClientUpdateFunc, Table1)
|
||||
@ -428,9 +428,11 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
||||
//удаление пустого импорта
|
||||
TextGRPC_Client = create_files.DeleteEmptyImport(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.DeleteEmptyLines(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.CheckAndAddImportTime_FromText(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.CheckAndAddImportTimestamp_FromText(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.CheckAndAddImportAlias(TextGRPC_Client)
|
||||
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
TextGRPC_Client = create_files.CheckAndAddImportTime_FromText(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.CheckAndAddImportTimestamp_FromText(TextGRPC_Client)
|
||||
TextGRPC_Client = create_files.CheckAndAddImportAlias(TextGRPC_Client)
|
||||
}
|
||||
|
||||
//запись файла
|
||||
err = os.WriteFile(FilenameReadyGRPC_ClientUpdate, []byte(TextGRPC_Client), constants.FILE_PERMISSIONS)
|
||||
|
@ -373,17 +373,17 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
||||
`
|
||||
|
||||
//заменим импорты
|
||||
//if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelTableURL)
|
||||
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelTableURL)
|
||||
|
||||
ProtoURL := create_files.FindProtoURL()
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ProtoURL)
|
||||
ProtoURL := create_files.FindProtoURL()
|
||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ProtoURL)
|
||||
|
||||
//ModelURL := create_files.FindModelURL()
|
||||
//TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelURL)
|
||||
//ModelURL := create_files.FindModelURL()
|
||||
//TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelURL)
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
//создание текста
|
||||
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextGRPCServerUpdateFunc, Table1)
|
||||
@ -397,10 +397,11 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
||||
//TextGRPCServer = strings.ReplaceAll(TextGRPCServer, config.Settings.TEXT_TEMPLATE_TABLENAME, Table1.Name)
|
||||
TextGRPCServer = TextGRPCServer + TextUpdateEveryColumn
|
||||
|
||||
TextGRPCServer = create_files.ConvertIdToAlias(TextGRPCServer, Table1)
|
||||
TextGRPCServer = create_files.CheckAndAddImportAlias(TextGRPCServer)
|
||||
|
||||
TextGRPCServer = config.Settings.TEXT_MODULE_GENERATED + TextGRPCServer
|
||||
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||
TextGRPCServer = create_files.ConvertIdToAlias(TextGRPCServer, Table1)
|
||||
TextGRPCServer = create_files.CheckAndAddImportAlias(TextGRPCServer)
|
||||
TextGRPCServer = config.Settings.TEXT_MODULE_GENERATED + TextGRPCServer
|
||||
}
|
||||
|
||||
//удаление пустого импорта
|
||||
TextGRPCServer = create_files.DeleteEmptyImport(TextGRPCServer)
|
||||
|
Loading…
Reference in New Issue
Block a user