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 {
|
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||||
DBConstantsURL := create_files.FindDBConstantsURL()
|
DBConstantsURL := create_files.FindDBConstantsURL()
|
||||||
TextCrud = create_files.AddImport(TextCrud, DBConstantsURL)
|
TextCrud = create_files.AddImport(TextCrud, DBConstantsURL)
|
||||||
|
|
||||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||||
TextCrud = create_files.AddImport(TextCrud, ModelTableURL)
|
TextCrud = create_files.AddImport(TextCrud, ModelTableURL)
|
||||||
|
|
||||||
//TextCrud = create_files.ConvertIdToAlias(TextCrud, Table1)
|
//TextCrud = create_files.ConvertIdToAlias(TextCrud, Table1)
|
||||||
//}
|
}
|
||||||
|
|
||||||
//создание текста
|
//создание текста
|
||||||
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextCrudUpdateFunc, Table1)
|
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextCrudUpdateFunc, Table1)
|
||||||
|
@ -389,27 +389,27 @@ func CreateFilesUpdateEveryColumn(Table1 *types.Table) error {
|
|||||||
`
|
`
|
||||||
|
|
||||||
//заменим импорты
|
//заменим импорты
|
||||||
//if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||||
ProtoURL := create_files.FindProtoURL()
|
ProtoURL := create_files.FindProtoURL()
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ProtoURL)
|
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ProtoURL)
|
||||||
|
|
||||||
GRPCClientURL := create_files.FindGRPClientURL()
|
GRPCClientURL := create_files.FindGRPClientURL()
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCClientURL)
|
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCClientURL)
|
||||||
|
|
||||||
GRPCConstantsURL := create_files.FindGRPCConstantsURL()
|
GRPCConstantsURL := create_files.FindGRPCConstantsURL()
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCConstantsURL)
|
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPCConstantsURL)
|
||||||
|
|
||||||
GRPC_NRPC_URL := create_files.Find_GRPC_NRPC_URL()
|
GRPC_NRPC_URL := create_files.Find_GRPC_NRPC_URL()
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPC_NRPC_URL)
|
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, GRPC_NRPC_URL)
|
||||||
|
|
||||||
NRPCClientURL := create_files.FindNRPClientURL()
|
NRPCClientURL := create_files.FindNRPClientURL()
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, NRPCClientURL)
|
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, NRPCClientURL)
|
||||||
|
|
||||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||||
TextGRPC_Client = create_files.AddImport(TextGRPC_Client, ModelTableURL)
|
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)
|
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.DeleteEmptyImport(TextGRPC_Client)
|
||||||
TextGRPC_Client = create_files.DeleteEmptyLines(TextGRPC_Client)
|
TextGRPC_Client = create_files.DeleteEmptyLines(TextGRPC_Client)
|
||||||
TextGRPC_Client = create_files.CheckAndAddImportTime_FromText(TextGRPC_Client)
|
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||||
TextGRPC_Client = create_files.CheckAndAddImportTimestamp_FromText(TextGRPC_Client)
|
TextGRPC_Client = create_files.CheckAndAddImportTime_FromText(TextGRPC_Client)
|
||||||
TextGRPC_Client = create_files.CheckAndAddImportAlias(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)
|
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 {
|
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||||
ModelTableURL := create_files.FindModelTableURL(TableName)
|
ModelTableURL := create_files.FindModelTableURL(TableName)
|
||||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelTableURL)
|
TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelTableURL)
|
||||||
|
|
||||||
ProtoURL := create_files.FindProtoURL()
|
ProtoURL := create_files.FindProtoURL()
|
||||||
TextGRPCServer = create_files.AddImport(TextGRPCServer, ProtoURL)
|
TextGRPCServer = create_files.AddImport(TextGRPCServer, ProtoURL)
|
||||||
|
|
||||||
//ModelURL := create_files.FindModelURL()
|
//ModelURL := create_files.FindModelURL()
|
||||||
//TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelURL)
|
//TextGRPCServer = create_files.AddImport(TextGRPCServer, ModelURL)
|
||||||
|
|
||||||
//}
|
}
|
||||||
|
|
||||||
//создание текста
|
//создание текста
|
||||||
TextUpdateEveryColumn := FindTextUpdateEveryColumn(TextGRPCServerUpdateFunc, Table1)
|
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 = strings.ReplaceAll(TextGRPCServer, config.Settings.TEXT_TEMPLATE_TABLENAME, Table1.Name)
|
||||||
TextGRPCServer = TextGRPCServer + TextUpdateEveryColumn
|
TextGRPCServer = TextGRPCServer + TextUpdateEveryColumn
|
||||||
|
|
||||||
TextGRPCServer = create_files.ConvertIdToAlias(TextGRPCServer, Table1)
|
if config.Settings.USE_DEFAULT_TEMPLATE == true {
|
||||||
TextGRPCServer = create_files.CheckAndAddImportAlias(TextGRPCServer)
|
TextGRPCServer = create_files.ConvertIdToAlias(TextGRPCServer, Table1)
|
||||||
|
TextGRPCServer = create_files.CheckAndAddImportAlias(TextGRPCServer)
|
||||||
TextGRPCServer = config.Settings.TEXT_MODULE_GENERATED + TextGRPCServer
|
TextGRPCServer = config.Settings.TEXT_MODULE_GENERATED + TextGRPCServer
|
||||||
|
}
|
||||||
|
|
||||||
//удаление пустого импорта
|
//удаление пустого импорта
|
||||||
TextGRPCServer = create_files.DeleteEmptyImport(TextGRPCServer)
|
TextGRPCServer = create_files.DeleteEmptyImport(TextGRPCServer)
|
||||||
|
Loading…
Reference in New Issue
Block a user