1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-12-22 00:36:41 +02:00

сделал ExtID

This commit is contained in:
Nikitin Aleksandr 2024-01-15 13:19:27 +03:00
parent ea9a801623
commit d769c49acb
34 changed files with 712 additions and 863 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@
/bin/sync_service/
/bin/sync_service_test/
/bin/crud_service/
/bin/templates_main/

View File

@ -5,8 +5,7 @@ FILEMAIN=./cmd/$(SERVICENAME)/main.go
FILEAPP=./bin/$(SERVICENAME)
NEW_REPO=$(SERVICENAME)
CD_GENERATION_PROTO=cd ./api
GENERATION_PROTO=generation_code.sh
GENERATION_PROTO=cd ./api && ./generation_code.sh
run:
@ -54,7 +53,6 @@ conn:
init:
clear
go mod init gitlab.aescorp.ru/dsp_dev/claim/sync_service
$(CD_GENERATION_PROTO)
$(GENERATION_PROTO)
go mod tidy
go mod vendor

View File

@ -9,647 +9,8 @@ package grpc;
option go_package = "./grpc_proto";
// Sync_service - сервис обмена с Базой данных
// sync_service - сервис обмена с Базой данных
service Sync_service {
//
rpc AccountingArea_Read(RequestId) returns (Response) {}
rpc AccountingArea_Create(RequestModel) returns (Response) {}
rpc AccountingArea_Update(RequestModel) returns (Response) {}
rpc AccountingArea_Save(RequestModel) returns (Response) {}
rpc AccountingArea_FindByExtID(RequestExtId) returns (Response) {}
rpc AccountingArea_Delete(RequestId) returns (Response) {}
rpc AccountingArea_Restore(RequestId) returns (Response) {}
//
rpc AccrualType_Read(RequestId) returns (Response) {}
rpc AccrualType_Create(RequestModel) returns (Response) {}
rpc AccrualType_Update(RequestModel) returns (Response) {}
rpc AccrualType_Save(RequestModel) returns (Response) {}
rpc AccrualType_Delete(RequestId) returns (Response) {}
rpc AccrualType_Restore(RequestId) returns (Response) {}
//
rpc Balance_Read(RequestId) returns (Response) {}
rpc Balance_Create(RequestModel) returns (Response) {}
rpc Balance_Update(RequestModel) returns (Response) {}
rpc Balance_Save(RequestModel) returns (Response) {}
rpc Balance_FindByExtID(RequestExtId) returns (Response) {}
rpc Balance_Delete(RequestId) returns (Response) {}
rpc Balance_Restore(RequestId) returns (Response) {}
//
rpc BankAccountOrganization_Read(RequestId) returns (Response) {}
rpc BankAccountOrganization_Create(RequestModel) returns (Response) {}
rpc BankAccountOrganization_Update(RequestModel) returns (Response) {}
rpc BankAccountOrganization_Save(RequestModel) returns (Response) {}
rpc BankAccountOrganization_FindByExtID(RequestExtId) returns (Response) {}
rpc BankAccountOrganization_Delete(RequestId) returns (Response) {}
rpc BankAccountOrganization_Restore(RequestId) returns (Response) {}
//
rpc Bank_Read(RequestId) returns (Response) {}
rpc Bank_Create(RequestModel) returns (Response) {}
rpc Bank_Update(RequestModel) returns (Response) {}
rpc Bank_Save(RequestModel) returns (Response) {}
rpc Bank_FindByExtID(RequestExtId) returns (Response) {}
rpc Bank_Delete(RequestId) returns (Response) {}
rpc Bank_Restore(RequestId) returns (Response) {}
//
rpc BeforeTimeType_Read(RequestId) returns (Response) {}
rpc BeforeTimeType_Create(RequestModel) returns (Response) {}
rpc BeforeTimeType_Update(RequestModel) returns (Response) {}
rpc BeforeTimeType_Save(RequestModel) returns (Response) {}
rpc BeforeTimeType_Delete(RequestId) returns (Response) {}
rpc BeforeTimeType_Restore(RequestId) returns (Response) {}
//
rpc BillKindType_Read(RequestId) returns (Response) {}
rpc BillKindType_Create(RequestModel) returns (Response) {}
rpc BillKindType_Update(RequestModel) returns (Response) {}
rpc BillKindType_Save(RequestModel) returns (Response) {}
rpc BillKindType_Delete(RequestId) returns (Response) {}
rpc BillKindType_Restore(RequestId) returns (Response) {}
//
rpc Branch_Read(RequestId) returns (Response) {}
rpc Branch_Create(RequestModel) returns (Response) {}
rpc Branch_Update(RequestModel) returns (Response) {}
rpc Branch_Save(RequestModel) returns (Response) {}
rpc Branch_Delete(RequestId) returns (Response) {}
rpc Branch_Restore(RequestId) returns (Response) {}
//
rpc Calendar_Read(RequestId) returns (Response) {}
rpc Calendar_Create(RequestModel) returns (Response) {}
rpc Calendar_Update(RequestModel) returns (Response) {}
rpc Calendar_Save(RequestModel) returns (Response) {}
rpc Calendar_Delete(RequestId) returns (Response) {}
rpc Calendar_Restore(RequestId) returns (Response) {}
//
rpc ChangeItem_Read(RequestId) returns (Response) {}
rpc ChangeItem_Create(RequestModel) returns (Response) {}
rpc ChangeItem_Update(RequestModel) returns (Response) {}
rpc ChangeItem_Save(RequestModel) returns (Response) {}
rpc ChangeItem_Delete(RequestId) returns (Response) {}
rpc ChangeItem_Restore(RequestId) returns (Response) {}
//
rpc ChannelType_Read(RequestId) returns (Response) {}
rpc ChannelType_Create(RequestModel) returns (Response) {}
rpc ChannelType_Update(RequestModel) returns (Response) {}
rpc ChannelType_Save(RequestModel) returns (Response) {}
rpc ChannelType_Delete(RequestId) returns (Response) {}
rpc ChannelType_Restore(RequestId) returns (Response) {}
//
rpc ClaimType_Read(RequestId) returns (Response) {}
rpc ClaimType_Create(RequestModel) returns (Response) {}
rpc ClaimType_Update(RequestModel) returns (Response) {}
rpc ClaimType_Save(RequestModel) returns (Response) {}
rpc ClaimType_Delete(RequestId) returns (Response) {}
rpc ClaimType_Restore(RequestId) returns (Response) {}
//
rpc ColorType_Read(RequestId) returns (Response) {}
rpc ColorType_Create(RequestModel) returns (Response) {}
rpc ColorType_Update(RequestModel) returns (Response) {}
rpc ColorType_Save(RequestModel) returns (Response) {}
rpc ColorType_Delete(RequestId) returns (Response) {}
rpc ColorType_Restore(RequestId) returns (Response) {}
//
rpc Comment_Read(RequestId) returns (Response) {}
rpc Comment_Create(RequestModel) returns (Response) {}
rpc Comment_Update(RequestModel) returns (Response) {}
rpc Comment_Save(RequestModel) returns (Response) {}
rpc Comment_Delete(RequestId) returns (Response) {}
rpc Comment_Restore(RequestId) returns (Response) {}
//
rpc CompletedMonth_Read(RequestId) returns (Response) {}
rpc CompletedMonth_Create(RequestModel) returns (Response) {}
rpc CompletedMonth_Update(RequestModel) returns (Response) {}
rpc CompletedMonth_Save(RequestModel) returns (Response) {}
rpc CompletedMonth_FindByExtID(RequestExtId) returns (Response) {}
rpc CompletedMonth_Delete(RequestId) returns (Response) {}
rpc CompletedMonth_Restore(RequestId) returns (Response) {}
//
//
rpc ContractBlackItem_Read(RequestId) returns (Response) {}
rpc ContractBlackItem_Create(RequestModel) returns (Response) {}
rpc ContractBlackItem_Update(RequestModel) returns (Response) {}
rpc ContractBlackItem_Save(RequestModel) returns (Response) {}
rpc ContractBlackItem_Delete(RequestId) returns (Response) {}
rpc ContractBlackItem_Restore(RequestId) returns (Response) {}
//
rpc ContractCategoryType_Read(RequestId) returns (Response) {}
rpc ContractCategoryType_Create(RequestModel) returns (Response) {}
rpc ContractCategoryType_Update(RequestModel) returns (Response) {}
rpc ContractCategoryType_Save(RequestModel) returns (Response) {}
rpc ContractCategoryType_FindByExtID(RequestExtId) returns (Response) {}
rpc ContractCategoryType_Delete(RequestId) returns (Response) {}
rpc ContractCategoryType_Restore(RequestId) returns (Response) {}
//
rpc ContractWhiteItem_Read(RequestId) returns (Response) {}
rpc ContractWhiteItem_Create(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Update(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Save(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Delete(RequestId) returns (Response) {}
rpc ContractWhiteItem_Restore(RequestId) returns (Response) {}
//
rpc Contract_Read(RequestId) returns (Response) {}
rpc Contract_Create(RequestModel) returns (Response) {}
rpc Contract_Update(RequestModel) returns (Response) {}
rpc Contract_Save(RequestModel) returns (Response) {}
rpc Contract_FindByExtID(RequestExtId) returns (Response) {}
rpc Contract_Delete(RequestId) returns (Response) {}
rpc Contract_Restore(RequestId) returns (Response) {}
//
rpc Court_Read(RequestId) returns (Response) {}
rpc Court_Create(RequestModel) returns (Response) {}
rpc Court_Update(RequestModel) returns (Response) {}
rpc Court_Save(RequestModel) returns (Response) {}
rpc Court_Delete(RequestId) returns (Response) {}
rpc Court_Restore(RequestId) returns (Response) {}
//
rpc DayType_Read(RequestId) returns (Response) {}
rpc DayType_Create(RequestModel) returns (Response) {}
rpc DayType_Update(RequestModel) returns (Response) {}
rpc DayType_Save(RequestModel) returns (Response) {}
rpc DayType_Delete(RequestId) returns (Response) {}
rpc DayType_Restore(RequestId) returns (Response) {}
//
rpc DebtType_Read(RequestId) returns (Response) {}
rpc DebtType_Create(RequestModel) returns (Response) {}
rpc DebtType_Update(RequestModel) returns (Response) {}
rpc DebtType_Save(RequestModel) returns (Response) {}
rpc DebtType_FindByExtID(RequestExtId) returns (Response) {}
rpc DebtType_Delete(RequestId) returns (Response) {}
rpc DebtType_Restore(RequestId) returns (Response) {}
//
rpc DirectionType_Read(RequestId) returns (Response) {}
rpc DirectionType_Create(RequestModel) returns (Response) {}
rpc DirectionType_Update(RequestModel) returns (Response) {}
rpc DirectionType_Save(RequestModel) returns (Response) {}
rpc DirectionType_Delete(RequestId) returns (Response) {}
rpc DirectionType_Restore(RequestId) returns (Response) {}
//
rpc DocumentLinkType_Read(RequestId) returns (Response) {}
rpc DocumentLinkType_Create(RequestModel) returns (Response) {}
rpc DocumentLinkType_Update(RequestModel) returns (Response) {}
rpc DocumentLinkType_Save(RequestModel) returns (Response) {}
rpc DocumentLinkType_Delete(RequestId) returns (Response) {}
rpc DocumentLinkType_Restore(RequestId) returns (Response) {}
//
rpc DocumentLink_Read(RequestId) returns (Response) {}
rpc DocumentLink_Create(RequestModel) returns (Response) {}
rpc DocumentLink_Update(RequestModel) returns (Response) {}
rpc DocumentLink_Save(RequestModel) returns (Response) {}
rpc DocumentLink_FindByExtID(RequestExtId) returns (Response) {}
rpc DocumentLink_Delete(RequestId) returns (Response) {}
rpc DocumentLink_Restore(RequestId) returns (Response) {}
//
rpc DocumentType_Read(RequestId) returns (Response) {}
rpc DocumentType_Create(RequestModel) returns (Response) {}
rpc DocumentType_Update(RequestModel) returns (Response) {}
rpc DocumentType_Save(RequestModel) returns (Response) {}
rpc DocumentType_FindByExtID(RequestExtId) returns (Response) {}
rpc DocumentType_Delete(RequestId) returns (Response) {}
rpc DocumentType_Restore(RequestId) returns (Response) {}
//
rpc Document_Read(RequestId) returns (Response) {}
rpc Document_Create(RequestModel) returns (Response) {}
rpc Document_Update(RequestModel) returns (Response) {}
rpc Document_Save(RequestModel) returns (Response) {}
rpc Document_FindByExtID(RequestExtId) returns (Response) {}
rpc Document_Delete(RequestId) returns (Response) {}
rpc Document_Restore(RequestId) returns (Response) {}
//
rpc Employee_FindByExtID(RequestExtId) returns (Response) {}
//
rpc EventType_Read(RequestId) returns (Response) {}
rpc EventType_Create(RequestModel) returns (Response) {}
rpc EventType_Update(RequestModel) returns (Response) {}
rpc EventType_Save(RequestModel) returns (Response) {}
rpc EventType_Delete(RequestId) returns (Response) {}
rpc EventType_Restore(RequestId) returns (Response) {}
//
rpc Event_Read(RequestId) returns (Response) {}
rpc Event_Create(RequestModel) returns (Response) {}
rpc Event_Update(RequestModel) returns (Response) {}
rpc Event_Save(RequestModel) returns (Response) {}
rpc Event_Delete(RequestId) returns (Response) {}
rpc Event_Restore(RequestId) returns (Response) {}
//
rpc Facsimile_Read(RequestId) returns (Response) {}
rpc Facsimile_Create(RequestModel) returns (Response) {}
rpc Facsimile_Update(RequestModel) returns (Response) {}
rpc Facsimile_Save(RequestModel) returns (Response) {}
rpc Facsimile_Delete(RequestId) returns (Response) {}
rpc Facsimile_Restore(RequestId) returns (Response) {}
//
rpc FileChange_Read(RequestId) returns (Response) {}
rpc FileChange_Create(RequestModel) returns (Response) {}
rpc FileChange_Update(RequestModel) returns (Response) {}
rpc FileChange_Save(RequestModel) returns (Response) {}
//
rpc FileTemplate_Read(RequestId) returns (Response) {}
rpc FileTemplate_Create(RequestModel) returns (Response) {}
rpc FileTemplate_Update(RequestModel) returns (Response) {}
rpc FileTemplate_Save(RequestModel) returns (Response) {}
rpc FileTemplate_Delete(RequestId) returns (Response) {}
rpc FileTemplate_Restore(RequestId) returns (Response) {}
//
rpc FileType_Read(RequestId) returns (Response) {}
rpc FileType_Create(RequestModel) returns (Response) {}
rpc FileType_Update(RequestModel) returns (Response) {}
rpc FileType_Save(RequestModel) returns (Response) {}
rpc FileType_Delete(RequestId) returns (Response) {}
rpc FileType_Restore(RequestId) returns (Response) {}
//
//
rpc GenderType_Read(RequestId) returns (Response) {}
rpc GenderType_Create(RequestModel) returns (Response) {}
rpc GenderType_Update(RequestModel) returns (Response) {}
rpc GenderType_Save(RequestModel) returns (Response) {}
rpc GenderType_Delete(RequestId) returns (Response) {}
rpc GenderType_Restore(RequestId) returns (Response) {}
//
rpc HashtagLink_Read(RequestId) returns (Response) {}
rpc HashtagLink_Create(RequestModel) returns (Response) {}
rpc HashtagLink_Update(RequestModel) returns (Response) {}
rpc HashtagLink_Save(RequestModel) returns (Response) {}
rpc HashtagLink_Delete(RequestId) returns (Response) {}
rpc HashtagLink_Restore(RequestId) returns (Response) {}
//
rpc Hashtag_Read(RequestId) returns (Response) {}
rpc Hashtag_Create(RequestModel) returns (Response) {}
rpc Hashtag_Update(RequestModel) returns (Response) {}
rpc Hashtag_Save(RequestModel) returns (Response) {}
rpc Hashtag_Delete(RequestId) returns (Response) {}
rpc Hashtag_Restore(RequestId) returns (Response) {}
//
rpc Individual_Read(RequestId) returns (Response) {}
rpc Individual_Create(RequestModel) returns (Response) {}
rpc Individual_Update(RequestModel) returns (Response) {}
rpc Individual_Save(RequestModel) returns (Response) {}
rpc Individual_FindByExtID(RequestExtId) returns (Response) {}
rpc Individual_Delete(RequestId) returns (Response) {}
rpc Individual_Restore(RequestId) returns (Response) {}
//
rpc InvoiceDebtTypeStat_Read(RequestId) returns (Response) {}
rpc InvoiceDebtTypeStat_Create(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Update(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Save(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Delete(RequestId) returns (Response) {}
rpc InvoiceDebtTypeStat_Restore(RequestId) returns (Response) {}
//
rpc LawsuitInvoiceCorrection_Read(RequestId) returns (Response) {}
rpc LawsuitInvoiceCorrection_Create(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Update(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Save(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Delete(RequestId) returns (Response) {}
rpc LawsuitInvoiceCorrection_Restore(RequestId) returns (Response) {}
//
rpc LawsuitInvoice_Read(RequestId) returns (Response) {}
rpc LawsuitInvoice_Create(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Update(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Save(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Delete(RequestId) returns (Response) {}
rpc LawsuitInvoice_Restore(RequestId) returns (Response) {}
//
rpc LawsuitPaymentCorrection_Read(RequestId) returns (Response) {}
rpc LawsuitPaymentCorrection_Create(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Update(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Save(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Delete(RequestId) returns (Response) {}
rpc LawsuitPaymentCorrection_Restore(RequestId) returns (Response) {}
//
rpc LawsuitPayment_Read(RequestId) returns (Response) {}
rpc LawsuitPayment_Create(RequestModel) returns (Response) {}
rpc LawsuitPayment_Update(RequestModel) returns (Response) {}
rpc LawsuitPayment_Save(RequestModel) returns (Response) {}
rpc LawsuitPayment_Delete(RequestId) returns (Response) {}
rpc LawsuitPayment_Restore(RequestId) returns (Response) {}
//
rpc LawsuitReasonType_Read(RequestId) returns (Response) {}
rpc LawsuitReasonType_Create(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Update(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Save(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Delete(RequestId) returns (Response) {}
rpc LawsuitReasonType_Restore(RequestId) returns (Response) {}
//
rpc LawsuitStageType_Read(RequestId) returns (Response) {}
rpc LawsuitStageType_Create(RequestModel) returns (Response) {}
rpc LawsuitStageType_Update(RequestModel) returns (Response) {}
rpc LawsuitStageType_Save(RequestModel) returns (Response) {}
rpc LawsuitStageType_Delete(RequestId) returns (Response) {}
rpc LawsuitStageType_Restore(RequestId) returns (Response) {}
//
//
//
rpc LawsuitType_Read(RequestId) returns (Response) {}
rpc LawsuitType_Create(RequestModel) returns (Response) {}
rpc LawsuitType_Update(RequestModel) returns (Response) {}
rpc LawsuitType_Save(RequestModel) returns (Response) {}
rpc LawsuitType_Delete(RequestId) returns (Response) {}
rpc LawsuitType_Restore(RequestId) returns (Response) {}
//
rpc Lawsuit_FindByExtID(RequestExtId) returns (Response) {}
//
rpc LegalType_Read(RequestId) returns (Response) {}
rpc LegalType_Create(RequestModel) returns (Response) {}
rpc LegalType_Update(RequestModel) returns (Response) {}
rpc LegalType_Save(RequestModel) returns (Response) {}
rpc LegalType_Delete(RequestId) returns (Response) {}
rpc LegalType_Restore(RequestId) returns (Response) {}
//
//
rpc MessageSendStatus_Read(RequestId) returns (Response) {}
rpc MessageSendStatus_Create(RequestModel) returns (Response) {}
rpc MessageSendStatus_Update(RequestModel) returns (Response) {}
rpc MessageSendStatus_Save(RequestModel) returns (Response) {}
rpc MessageSendStatus_Delete(RequestId) returns (Response) {}
rpc MessageSendStatus_Restore(RequestId) returns (Response) {}
//
//
//
rpc NotificationType_Read(RequestId) returns (Response) {}
rpc NotificationType_Create(RequestModel) returns (Response) {}
rpc NotificationType_Update(RequestModel) returns (Response) {}
rpc NotificationType_Save(RequestModel) returns (Response) {}
rpc NotificationType_Delete(RequestId) returns (Response) {}
rpc NotificationType_Restore(RequestId) returns (Response) {}
//
//
rpc OrganizationCategoryType_Read(RequestId) returns (Response) {}
rpc OrganizationCategoryType_Create(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_Update(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_Save(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_FindByExtID(RequestExtId) returns (Response) {}
rpc OrganizationCategoryType_Delete(RequestId) returns (Response) {}
rpc OrganizationCategoryType_Restore(RequestId) returns (Response) {}
//
rpc OrganizationStateType_Read(RequestId) returns (Response) {}
rpc OrganizationStateType_Create(RequestModel) returns (Response) {}
rpc OrganizationStateType_Update(RequestModel) returns (Response) {}
rpc OrganizationStateType_Save(RequestModel) returns (Response) {}
rpc OrganizationStateType_Delete(RequestId) returns (Response) {}
rpc OrganizationStateType_Restore(RequestId) returns (Response) {}
//
rpc Organization_FindByExtID(RequestExtId) returns (Response) {}
//
rpc PaymentDay_Read(RequestId) returns (Response) {}
rpc PaymentDay_Create(RequestModel) returns (Response) {}
rpc PaymentDay_Update(RequestModel) returns (Response) {}
rpc PaymentDay_Save(RequestModel) returns (Response) {}
rpc PaymentDay_FindByExtID(RequestExtId) returns (Response) {}
rpc PaymentDay_Delete(RequestId) returns (Response) {}
rpc PaymentDay_Restore(RequestId) returns (Response) {}
//
rpc PaymentSchedule_Read(RequestId) returns (Response) {}
rpc PaymentSchedule_Create(RequestModel) returns (Response) {}
rpc PaymentSchedule_Update(RequestModel) returns (Response) {}
rpc PaymentSchedule_Save(RequestModel) returns (Response) {}
rpc PaymentSchedule_FindByExtID(RequestExtId) returns (Response) {}
rpc PaymentSchedule_Delete(RequestId) returns (Response) {}
rpc PaymentSchedule_Restore(RequestId) returns (Response) {}
//
rpc PenaltyCalculationItem_Read(RequestId) returns (Response) {}
rpc PenaltyCalculationItem_Create(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_Update(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_Save(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_FindByExtID(RequestExtId) returns (Response) {}
rpc PenaltyCalculationItem_Delete(RequestId) returns (Response) {}
rpc PenaltyCalculationItem_Restore(RequestId) returns (Response) {}
//
rpc PriorityType_Read(RequestId) returns (Response) {}
rpc PriorityType_Create(RequestModel) returns (Response) {}
rpc PriorityType_Update(RequestModel) returns (Response) {}
rpc PriorityType_Save(RequestModel) returns (Response) {}
rpc PriorityType_Delete(RequestId) returns (Response) {}
rpc PriorityType_Restore(RequestId) returns (Response) {}
//
rpc RepeatType_Read(RequestId) returns (Response) {}
rpc RepeatType_Create(RequestModel) returns (Response) {}
rpc RepeatType_Update(RequestModel) returns (Response) {}
rpc RepeatType_Save(RequestModel) returns (Response) {}
rpc RepeatType_Delete(RequestId) returns (Response) {}
rpc RepeatType_Restore(RequestId) returns (Response) {}
//
rpc ServiceProvider_Read(RequestId) returns (Response) {}
rpc ServiceProvider_Create(RequestModel) returns (Response) {}
rpc ServiceProvider_Update(RequestModel) returns (Response) {}
rpc ServiceProvider_Save(RequestModel) returns (Response) {}
rpc ServiceProvider_FindByExtID(RequestExtId) returns (Response) {}
rpc ServiceProvider_Delete(RequestId) returns (Response) {}
rpc ServiceProvider_Restore(RequestId) returns (Response) {}
//
rpc ServiceType_Read(RequestId) returns (Response) {}
rpc ServiceType_Create(RequestModel) returns (Response) {}
rpc ServiceType_Update(RequestModel) returns (Response) {}
rpc ServiceType_Save(RequestModel) returns (Response) {}
rpc ServiceType_FindByExtID(RequestExtId) returns (Response) {}
rpc ServiceType_Delete(RequestId) returns (Response) {}
rpc ServiceType_Restore(RequestId) returns (Response) {}
//
rpc StateDuty_Read(RequestId) returns (Response) {}
rpc StateDuty_Create(RequestModel) returns (Response) {}
rpc StateDuty_Update(RequestModel) returns (Response) {}
rpc StateDuty_Save(RequestModel) returns (Response) {}
rpc StateDuty_Delete(RequestId) returns (Response) {}
rpc StateDuty_Restore(RequestId) returns (Response) {}
//
rpc TableName_Read(RequestId) returns (Response) {}
rpc TableName_Create(RequestModel) returns (Response) {}
rpc TableName_Update(RequestModel) returns (Response) {}
rpc TableName_Save(RequestModel) returns (Response) {}
rpc TableName_Delete(RequestId) returns (Response) {}
rpc TableName_Restore(RequestId) returns (Response) {}
//
rpc UserRole_Read(RequestId) returns (Response) {}
rpc UserRole_Create(RequestModel) returns (Response) {}
rpc UserRole_Update(RequestModel) returns (Response) {}
rpc UserRole_Save(RequestModel) returns (Response) {}
rpc UserRole_Delete(RequestId) returns (Response) {}
rpc UserRole_Restore(RequestId) returns (Response) {}
//
rpc WhiteListReasonType_Read(RequestId) returns (Response) {}
rpc WhiteListReasonType_Create(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Update(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Save(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Delete(RequestId) returns (Response) {}
rpc WhiteListReasonType_Restore(RequestId) returns (Response) {}
//
rpc Organization_Read(RequestId) returns (Response) {}
rpc Organization_Create(RequestModel) returns (Response) {}
rpc Organization_Update(RequestModel) returns (Response) {}
rpc Organization_Save(RequestModel) returns (Response) {}
rpc Organization_Delete(RequestId) returns (Response) {}
rpc Organization_Restore(RequestId) returns (Response) {}
rpc Organization_FindByInnKpp(RequestInnKpp) returns (Response) {}
rpc Organization_FindByExtId(RequestExtId) returns (Response) {}
//
rpc File_Read(RequestId) returns (Response) {}
rpc File_Create(RequestModel) returns (Response) {}
rpc File_Update(RequestModel) returns (Response) {}
rpc File_Save(RequestModel) returns (Response) {}
rpc File_Delete(RequestId) returns (Response) {}
rpc File_Restore(RequestId) returns (Response) {}
rpc File_FindByFileID(RequestString) returns (Response) {}
rpc File_FindByFullName(RequestString) returns (Response) {}
rpc File_FindBy_TableNameID_TableRowID(RequestIdId) returns (ResponseMass) {}
rpc File_FindBy_TableNameID_TableRowID_FileTypeID(RequestIdIdId) returns (ResponseMass) {}
//
rpc OrganizationCasebook_Read(RequestId) returns (Response) {}
rpc OrganizationCasebook_Create(RequestModel) returns (Response) {}
rpc OrganizationCasebook_Update(RequestModel) returns (Response) {}
rpc OrganizationCasebook_Save(RequestModel) returns (Response) {}
rpc OrganizationCasebook_Delete(RequestId) returns (Response) {}
rpc OrganizationCasebook_Restore(RequestId) returns (Response) {}
rpc OrganizationCasebook_FindByInnKpp(RequestInnKpp) returns (Response) {}
rpc OrganizationCasebook_FindByInn(RequestString) returns (Response) {}
rpc OrganizationCasebook_FindByOrganizationId(RequestId) returns (Response) {}
//
rpc Connection_Read(RequestId) returns (Response) {}
rpc Connection_Create(RequestModel) returns (Response) {}
rpc Connection_Update(RequestModel) returns (Response) {}
rpc Connection_Save(RequestModel) returns (Response) {}
//
rpc Employee_Read(RequestId) returns (Response) {}
rpc Employee_Create(RequestModel) returns (Response) {}
rpc Employee_Update(RequestModel) returns (Response) {}
rpc Employee_Save(RequestModel) returns (Response) {}
rpc Employee_Delete(RequestId) returns (Response) {}
rpc Employee_Restore(RequestId) returns (Response) {}
rpc Employee_FindByExtId(RequestExtId) returns (Response) {}
rpc Employee_FindByLogin(RequestString) returns (Response) {}
rpc Employee_FindByEMail(RequestString) returns (Response) {}
rpc Employee_FindByFIO(RequestString3) returns (Response) {}
//
rpc LawsuitStatusState_Read(RequestId) returns (Response) {}
rpc LawsuitStatusState_Create(RequestModel) returns (Response) {}
rpc LawsuitStatusState_Update(RequestModel) returns (Response) {}
rpc LawsuitStatusState_Save(RequestModel) returns (Response) {}
rpc LawsuitStatusState_Delete(RequestId) returns (Response) {}
rpc LawsuitStatusState_Restore(RequestId) returns (Response) {}
rpc LawsuitStatusState_FillFromLawsuit(RequestIdId) returns (ResponseEmpty) {}
rpc LawsuitStatusState_FindDebtSum(RequestIdId) returns (ResponseFloat64) {}
//
rpc LawsuitStatusType_Read(RequestId) returns (Response) {}
rpc LawsuitStatusType_Create(RequestModel) returns (Response) {}
rpc LawsuitStatusType_Update(RequestModel) returns (Response) {}
rpc LawsuitStatusType_Save(RequestModel) returns (Response) {}
rpc LawsuitStatusType_Delete(RequestId) returns (Response) {}
rpc LawsuitStatusType_Restore(RequestId) returns (Response) {}
//
rpc Lawsuit_Read(RequestId) returns (Response) {}
rpc Lawsuit_Create(RequestModel) returns (Response) {}
rpc Lawsuit_Update(RequestModel) returns (Response) {}
rpc Lawsuit_Save(RequestModel) returns (Response) {}
rpc Lawsuit_Delete(RequestId) returns (Response) {}
rpc Lawsuit_Restore(RequestId) returns (Response) {}
//
rpc MessageAttachement_Read(RequestId) returns (Response) {}
rpc MessageAttachement_Create(RequestModel) returns (Response) {}
rpc MessageAttachement_Update(RequestModel) returns (Response) {}
rpc MessageAttachement_Save(RequestModel) returns (Response) {}
rpc MessageAttachement_Delete(RequestId) returns (Response) {}
rpc MessageAttachement_Restore(RequestId) returns (Response) {}
//
rpc MessageSendStatuse_Read(RequestId) returns (Response) {}
rpc MessageSendStatuse_Create(RequestModel) returns (Response) {}
rpc MessageSendStatuse_Update(RequestModel) returns (Response) {}
rpc MessageSendStatuse_Save(RequestModel) returns (Response) {}
rpc MessageSendStatuse_Delete(RequestId) returns (Response) {}
rpc MessageSendStatuse_Restore(RequestId) returns (Response) {}
//
rpc MessageType_Read(RequestId) returns (Response) {}
rpc MessageType_Create(RequestModel) returns (Response) {}
rpc MessageType_Update(RequestModel) returns (Response) {}
rpc MessageType_Save(RequestModel) returns (Response) {}
rpc MessageType_Delete(RequestId) returns (Response) {}
rpc MessageType_Restore(RequestId) returns (Response) {}
//
rpc Message_Read(RequestId) returns (Response) {}
rpc Message_Create(RequestModel) returns (Response) {}
rpc Message_Update(RequestModel) returns (Response) {}
rpc Message_Save(RequestModel) returns (Response) {}
rpc Message_Delete(RequestId) returns (Response) {}
rpc Message_Restore(RequestId) returns (Response) {}
rpc Message_FindBy_LawsuitID_MessageTypeID(RequestIdId) returns (Response) {}
}
// RequestId - параметры запроса на сервер
@ -673,9 +34,9 @@ message RequestString3 {
}
// RequestId - параметры запроса на сервер
message RequestExtId {
message RequestExtID {
uint32 VersionModel= 1; //версия структуры модели
int64 Ext_id = 2; // ext_id записи в БД
int64 ExtID = 2; // ext_id записи в БД
int64 Connection_id =3; // Connection_id записи в БД
}
@ -699,14 +60,6 @@ message RequestIdId {
int64 ID2 = 3; // id записи в БД
}
// RequestIdIdId - параметры запроса на сервер
message RequestIdIdId {
uint32 VersionModel= 1; //версия структуры модели
int64 ID1 = 2; // id записи в БД
int64 ID2 = 3; // id записи в БД
int64 ID3 = 4; // id записи в БД
}
// Response - параметры ответа на клиент
@ -723,8 +76,3 @@ message ResponseFloat64 {
message ResponseEmpty {
}
// Response - параметры ответа на клиент
message ResponseMass {
repeated string MassModelString = 1; //массив объект-модель в формате json
}

View File

@ -1,14 +1,3 @@
{
"lawsuit_payments.id": "alias.PaymentId",
"lawsuit_payments.invoice_id": "alias.InvoiceId",
"lawsuit_payments.lawsuit_id": "alias.LawsuitId",
"lawsuit_payments.id": "alias.PaymentId",
"invoice_debt_type_stats.invoice_id": "alias.InvoiceId",
"invoice_debt_type_stats.lawsuit_id": "alias.LawsuitId",
"contract_black_items.contract_number": "alias.ContractNumber",
"contract_white_items.contract_number": "alias.ContractNumber",
"lawsuits.number_claim": "alias.ClaimNumber",
"lawsuits.number": "alias.LawsuitNumber",
"contracts.number": "alias.ContractNumber"
}

View File

@ -1,8 +1,2 @@
{
"lawsuits": [
{
"old": "create_update_ctx",
"new": "create_update_ctx_original"
}
]
}

View File

@ -1,3 +1,2 @@
{
"lawsuits": "NewLawsuit,AsLawsuit,create_update_ctx"
}

View File

@ -1,19 +1,2 @@
{
"inn": "INN",
"kpp": "KPP",
"okpo": "OKPO",
"ogrn": "OGRN",
"okato": "OKATO",
"nsi_flat": "NSIFlat",
"nsi_flat_id": "NSIFlatID",
"nsi_id": "NSIID",
"www": "WWW",
"bik": "BIK",
"city_name": "City",
"edms_link": "EDMSLink",
"code_nsi": "CodeNSI",
"json_updated_at": "JSONUpdatedAt",
"pdf_updated_at": "PDFUpdatedAt",
"pdf_file_id": "PDFFileID",
"json_file_id": "JSONFileID"
}

View File

@ -1,4 +1,2 @@
{
"ext_id": true,
"created_at": false
}

View File

@ -21,15 +21,15 @@ DB_PASSWORD=
INCLUDE_TABLES=""
#INCLUDE_TABLES - table name ignore filter. Regular expression
EXCLUDE_TABLES="ext_"
EXCLUDE_TABLES=
#---------------------Template settings---------------------
#SERVICE_REPOSITORY_URL - URL of your new service repository (Github, gitlab, etc.)
SERVICE_REPOSITORY_URL="gitlab.aescorp.ru/dsp_dev/claim/sync_service"
SERVICE_REPOSITORY_URL="gitlab.aescorp.ru/dsp_dev/claim/crud_service"
#SERVICE_NAME - service name for your new service
SERVICE_NAME=sync_service
SERVICE_NAME=crud_service
#TEMPLATE_SERVICE_NAME - service name in your template files
TEMPLATE_SERVICE_NAME=sync_service
@ -96,7 +96,7 @@ TEXT_TEMPLATE_TABLENAME="lawsuit_status_types"
USE_DEFAULT_TEMPLATE=true
#HAS_IS_DELETED - fill "true" if you have "is_deleted" column, and want Delete() Restore() functions.
HAS_IS_DELETED=true
HAS_IS_DELETED=false
#---------------------Create files settings---------------------

View File

@ -245,7 +245,7 @@ func (s *ServerGRPC) LawsuitStatusType_Save(ctx context.Context, Request *grpc_p
}
// LawsuitStatusType_FindByExtID - возвращает запись из БД по ext_id и connection_id
func (s *ServerGRPC) LawsuitStatusType_FindByExtID(ctx context.Context, Request *grpc_proto.RequestExtId) (*grpc_proto.Response, error) {
func (s *ServerGRPC) LawsuitStatusType_FindByExtID(ctx context.Context, Request *grpc_proto.RequestExtID) (*grpc_proto.Response, error) {
var Otvet grpc_proto.Response
var err error
@ -265,7 +265,7 @@ func (s *ServerGRPC) LawsuitStatusType_FindByExtID(ctx context.Context, Request
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ExtID = Request.ExtId
Model.ExtID = Request.ExtID
Model.ConnectionID = Request.ConnectionId
err = Model.Find_ByExtID()
if err != nil {

View File

@ -7,6 +7,7 @@ import (
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/grpc/grpc_proto"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
"testing"
"math"
)
// LawsuitStatusType_ID_Test - ID таблицы для тестирования
@ -37,7 +38,7 @@ func Test_server_LawsuitStatusType_Delete(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.ID = LawsuitStatusType_ID_Test
Request.ID = math.MinInt64
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -177,16 +178,16 @@ func Test_server_LawsuitStatusType_FindByExtID(t *testing.T) {
ctx = context.Background()
RequestExtId:= grpc_proto.RequestExtId{}
RequestExtId.ExtId = Model.ExtID
RequestExtId.ConnectionId = Model.ConnectionID
RequestExtId.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
RequestExtID:= grpc_proto.RequestExtID{}
RequestExtID.ExtID = Model.ExtID
RequestExtID.ConnectionId = Model.ConnectionID
RequestExtID.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
Otvet, err := server1.LawsuitStatusType_FindByExtID(ctx, &RequestExtId)
Otvet, err := server1.LawsuitStatusType_FindByExtID(ctx, &RequestExtID)
if err != nil {
t.Error("Test_server_LawsuitStatusType_FindByExtId() error: ", err)
t.Error("Test_server_LawsuitStatusType_FindByExtID() error: ", err)
}
if Otvet.ModelString == "" {
t.Error("Test_server_LawsuitStatusType_FindByExtId() error: ModelString=''")
t.Error("Test_server_LawsuitStatusType_FindByExtID() error: ModelString=''")
}
}

View File

@ -291,8 +291,8 @@ func (crud Crud_GRPC) Find_ByExtID(m *lawsuit_status_types.LawsuitStatusType) er
//подготовка запроса
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestExtId{}
Request.ExtId = m.ExtID
Request := &grpc_proto.RequestExtID{}
Request.ExtID = m.ExtID
Request.ConnectionId = m.ConnectionID
Request.VersionModel = VersionModel

View File

@ -1,9 +1,10 @@
package grpc_lawsuit_status_types
import (
"github.com/ManyakRus/starter/config_main"
config "github.com/ManyakRus/starter/config_main"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/grpc/grpc_client"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
"math"
"testing"
)
@ -110,44 +111,11 @@ func TestDelete(t *testing.T) {
crud := Crud_GRPC{}
Otvet := lawsuit_status_types.LawsuitStatusType{}
Otvet.ID = Postgres_ID_Test
err := crud.Read(&Otvet)
Otvet.ID = math.MinInt64
err := crud.Delete(&Otvet)
if err != nil {
t.Error("TestRead() error: ", err)
}
if Otvet.IsDeleted == false {
err = crud.Delete(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
err = crud.Restore(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
} else {
err = crud.Restore(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
err = crud.Delete(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
t.Error("TestDelete() error: ", err)
}
}

View File

@ -265,8 +265,8 @@ func (crud Crud_NRPC) Find_ByExtID(m *lawsuit_status_types.LawsuitStatusType) er
//подготовка запроса
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestExtId{}
Request.ExtId = m.ExtID
Request := &grpc_proto.RequestExtID{}
Request.ExtID = m.ExtID
Request.ConnectionId = m.ConnectionID
Request.VersionModel = VersionModel

View File

@ -1,10 +1,11 @@
package nrpc_lawsuit_status_types
import (
"github.com/ManyakRus/starter/config_main"
config "github.com/ManyakRus/starter/config_main"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/nrpc/nrpc_client"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
"testing"
"math"
)
// Postgres_ID_Test - ID таблицы для тестирования
@ -110,44 +111,10 @@ func TestDelete(t *testing.T) {
crud := Crud_NRPC{}
Otvet := lawsuit_status_types.LawsuitStatusType{}
Otvet.ID = Postgres_ID_Test
err := crud.Read(&Otvet)
Otvet.ID = math.MinInt64
err := crud.Delete(&Otvet)
if err != nil {
t.Error("TestRead() error: ", err)
}
if Otvet.IsDeleted == false {
err = crud.Delete(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
err = crud.Restore(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
} else {
err = crud.Restore(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
err = crud.Delete(&Otvet)
if err != nil {
t.Error("TestDelete() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestDelete() error: ID =0")
}
t.Error("TestDelete() error: ", err)
}
}
@ -175,10 +142,10 @@ func TestFindByExtID(t *testing.T) {
err = crud.Find_ByExtID(&Otvet)
if err != nil {
t.Error("TestFindByExtId() error: ", err)
t.Error("TestFindByExtID() error: ", err)
}
if Otvet.ID == 0 {
t.Error("TestFindByExtId() error: ID =0")
t.Error("TestFindByExtID() error: ID =0")
}
}

View File

@ -11,8 +11,8 @@ import (
// versionLawsuitStatusType - версия структуры модели, с учётом имен и типов полей
var versionLawsuitStatusType uint32
// Crud_LawsuitStatusType - объект контроллер crud операций
var Crud_LawsuitStatusType ICrud_LawsuitStatusType
// crud_LawsuitStatusType - объект контроллер crud операций
var crud_LawsuitStatusType ICrud_LawsuitStatusType
// интерфейс стандартных CRUD операций, для использования в DB или GRPC или NRPC
type ICrud_LawsuitStatusType interface {
@ -92,84 +92,84 @@ func (m LawsuitStatusType) GetJSON() (string, error) {
// Read - находит запись в БД по ID, и заполняет в объект
func (m *LawsuitStatusType) Read() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Read(m)
err := crud_LawsuitStatusType.Read(m)
return err
}
// Save - записывает объект в БД по ID
func (m *LawsuitStatusType) Save() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Save(m)
err := crud_LawsuitStatusType.Save(m)
return err
}
// Update - обновляет объект в БД по ID
func (m *LawsuitStatusType) Update() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Update(m)
err := crud_LawsuitStatusType.Update(m)
return err
}
// Create - создаёт объект в БД с новым ID
func (m *LawsuitStatusType) Create() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Create(m)
err := crud_LawsuitStatusType.Create(m)
return err
}
// Delete - устанавливает признак пометки удаления в БД
func (m *LawsuitStatusType) Delete() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Delete(m)
err := crud_LawsuitStatusType.Delete(m)
return err
}
// Restore - снимает признак пометки удаления в БД
func (m *LawsuitStatusType) Restore() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Restore(m)
err := crud_LawsuitStatusType.Restore(m)
return err
}
// Find_ByExtID - находит объект по ExtID
func (m *LawsuitStatusType) Find_ByExtID() error {
if Crud_LawsuitStatusType == nil {
if crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := Crud_LawsuitStatusType.Find_ByExtID(m)
err := crud_LawsuitStatusType.Find_ByExtID(m)
return err
}
// SetCrudInterface - заполняет интерфейс crud: DB, GRPC, NRPC
func (m LawsuitStatusType) SetCrudInterface(crud ICrud_LawsuitStatusType) {
Crud_LawsuitStatusType = crud
crud_LawsuitStatusType = crud
return
}

View File

@ -28,7 +28,7 @@ func (s *ServerGRPC) LawsuitStatusType_Read(ctx context.Context, Request *grpc_p
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Read()
if err != nil {
return &Otvet, err
@ -65,7 +65,7 @@ func (s *ServerGRPC) LawsuitStatusType_Delete(ctx context.Context, Request *grpc
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Delete()
if err != nil {
return &Otvet, err
@ -102,7 +102,7 @@ func (s *ServerGRPC) LawsuitStatusType_Restore(ctx context.Context, Request *grp
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Restore()
if err != nil {
return &Otvet, err

View File

@ -19,7 +19,7 @@ func Test_server_LawsuitStatusType_Read(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -38,7 +38,7 @@ func Test_server_LawsuitStatusType_Delete(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = math.MinInt64
Request.ID = math.MinInt64
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -86,7 +86,7 @@ func Test_server_LawsuitStatusType_Update(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -122,7 +122,7 @@ func Test_server_LawsuitStatusType_Save(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -156,7 +156,7 @@ func Test_server_LawsuitStatusType_FindByExtID(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}

View File

@ -42,7 +42,7 @@ func (crud Crud_GRPC) Read(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()
@ -214,7 +214,7 @@ func (crud Crud_GRPC) Delete(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()
@ -254,7 +254,7 @@ func (crud Crud_GRPC) Restore(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()

View File

@ -40,7 +40,7 @@ func (crud Crud_NRPC) Read(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос
@ -196,7 +196,7 @@ func (crud Crud_NRPC) Delete(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос
@ -232,7 +232,7 @@ func (crud Crud_NRPC) Restore(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос

View File

@ -9,8 +9,537 @@ package grpc;
option go_package = "./grpc_proto";
// sync_service - сервис обмена с Базой данных
// Sync_service - сервис обмена с Базой данных
service Sync_service {
//
rpc AccountingArea_Read(RequestId) returns (Response) {}
rpc AccountingArea_Create(RequestModel) returns (Response) {}
rpc AccountingArea_Update(RequestModel) returns (Response) {}
rpc AccountingArea_Save(RequestModel) returns (Response) {}
rpc AccountingArea_FindByExtID(RequestExtId) returns (Response) {}
rpc AccountingArea_Delete(RequestId) returns (Response) {}
rpc AccountingArea_Restore(RequestId) returns (Response) {}
//
rpc AccrualType_Read(RequestId) returns (Response) {}
rpc AccrualType_Create(RequestModel) returns (Response) {}
rpc AccrualType_Update(RequestModel) returns (Response) {}
rpc AccrualType_Save(RequestModel) returns (Response) {}
rpc AccrualType_Delete(RequestId) returns (Response) {}
rpc AccrualType_Restore(RequestId) returns (Response) {}
//
rpc Balance_Read(RequestId) returns (Response) {}
rpc Balance_Create(RequestModel) returns (Response) {}
rpc Balance_Update(RequestModel) returns (Response) {}
rpc Balance_Save(RequestModel) returns (Response) {}
rpc Balance_FindByExtID(RequestExtId) returns (Response) {}
rpc Balance_Delete(RequestId) returns (Response) {}
rpc Balance_Restore(RequestId) returns (Response) {}
//
rpc BankAccountOrganization_Read(RequestId) returns (Response) {}
rpc BankAccountOrganization_Create(RequestModel) returns (Response) {}
rpc BankAccountOrganization_Update(RequestModel) returns (Response) {}
rpc BankAccountOrganization_Save(RequestModel) returns (Response) {}
rpc BankAccountOrganization_FindByExtID(RequestExtId) returns (Response) {}
rpc BankAccountOrganization_Delete(RequestId) returns (Response) {}
rpc BankAccountOrganization_Restore(RequestId) returns (Response) {}
//
rpc Bank_Read(RequestId) returns (Response) {}
rpc Bank_Create(RequestModel) returns (Response) {}
rpc Bank_Update(RequestModel) returns (Response) {}
rpc Bank_Save(RequestModel) returns (Response) {}
rpc Bank_FindByExtID(RequestExtId) returns (Response) {}
rpc Bank_Delete(RequestId) returns (Response) {}
rpc Bank_Restore(RequestId) returns (Response) {}
//
rpc BeforeTimeType_Read(RequestId) returns (Response) {}
rpc BeforeTimeType_Create(RequestModel) returns (Response) {}
rpc BeforeTimeType_Update(RequestModel) returns (Response) {}
rpc BeforeTimeType_Save(RequestModel) returns (Response) {}
rpc BeforeTimeType_Delete(RequestId) returns (Response) {}
rpc BeforeTimeType_Restore(RequestId) returns (Response) {}
//
rpc BillKindType_Read(RequestId) returns (Response) {}
rpc BillKindType_Create(RequestModel) returns (Response) {}
rpc BillKindType_Update(RequestModel) returns (Response) {}
rpc BillKindType_Save(RequestModel) returns (Response) {}
rpc BillKindType_Delete(RequestId) returns (Response) {}
rpc BillKindType_Restore(RequestId) returns (Response) {}
//
rpc Branch_Read(RequestId) returns (Response) {}
rpc Branch_Create(RequestModel) returns (Response) {}
rpc Branch_Update(RequestModel) returns (Response) {}
rpc Branch_Save(RequestModel) returns (Response) {}
rpc Branch_Delete(RequestId) returns (Response) {}
rpc Branch_Restore(RequestId) returns (Response) {}
//
rpc Calendar_Read(RequestId) returns (Response) {}
rpc Calendar_Create(RequestModel) returns (Response) {}
rpc Calendar_Update(RequestModel) returns (Response) {}
rpc Calendar_Save(RequestModel) returns (Response) {}
rpc Calendar_Delete(RequestId) returns (Response) {}
rpc Calendar_Restore(RequestId) returns (Response) {}
//
rpc ChangeItem_Read(RequestId) returns (Response) {}
rpc ChangeItem_Create(RequestModel) returns (Response) {}
rpc ChangeItem_Update(RequestModel) returns (Response) {}
rpc ChangeItem_Save(RequestModel) returns (Response) {}
rpc ChangeItem_Delete(RequestId) returns (Response) {}
rpc ChangeItem_Restore(RequestId) returns (Response) {}
//
rpc ChannelType_Read(RequestId) returns (Response) {}
rpc ChannelType_Create(RequestModel) returns (Response) {}
rpc ChannelType_Update(RequestModel) returns (Response) {}
rpc ChannelType_Save(RequestModel) returns (Response) {}
rpc ChannelType_Delete(RequestId) returns (Response) {}
rpc ChannelType_Restore(RequestId) returns (Response) {}
//
rpc ClaimType_Read(RequestId) returns (Response) {}
rpc ClaimType_Create(RequestModel) returns (Response) {}
rpc ClaimType_Update(RequestModel) returns (Response) {}
rpc ClaimType_Save(RequestModel) returns (Response) {}
rpc ClaimType_Delete(RequestId) returns (Response) {}
rpc ClaimType_Restore(RequestId) returns (Response) {}
//
rpc ColorType_Read(RequestId) returns (Response) {}
rpc ColorType_Create(RequestModel) returns (Response) {}
rpc ColorType_Update(RequestModel) returns (Response) {}
rpc ColorType_Save(RequestModel) returns (Response) {}
rpc ColorType_Delete(RequestId) returns (Response) {}
rpc ColorType_Restore(RequestId) returns (Response) {}
//
rpc Comment_Read(RequestId) returns (Response) {}
rpc Comment_Create(RequestModel) returns (Response) {}
rpc Comment_Update(RequestModel) returns (Response) {}
rpc Comment_Save(RequestModel) returns (Response) {}
rpc Comment_Delete(RequestId) returns (Response) {}
rpc Comment_Restore(RequestId) returns (Response) {}
//
rpc CompletedMonth_Read(RequestId) returns (Response) {}
rpc CompletedMonth_Create(RequestModel) returns (Response) {}
rpc CompletedMonth_Update(RequestModel) returns (Response) {}
rpc CompletedMonth_Save(RequestModel) returns (Response) {}
rpc CompletedMonth_FindByExtID(RequestExtId) returns (Response) {}
rpc CompletedMonth_Delete(RequestId) returns (Response) {}
rpc CompletedMonth_Restore(RequestId) returns (Response) {}
//
//
rpc ContractBlackItem_Read(RequestId) returns (Response) {}
rpc ContractBlackItem_Create(RequestModel) returns (Response) {}
rpc ContractBlackItem_Update(RequestModel) returns (Response) {}
rpc ContractBlackItem_Save(RequestModel) returns (Response) {}
rpc ContractBlackItem_Delete(RequestId) returns (Response) {}
rpc ContractBlackItem_Restore(RequestId) returns (Response) {}
//
rpc ContractCategoryType_Read(RequestId) returns (Response) {}
rpc ContractCategoryType_Create(RequestModel) returns (Response) {}
rpc ContractCategoryType_Update(RequestModel) returns (Response) {}
rpc ContractCategoryType_Save(RequestModel) returns (Response) {}
rpc ContractCategoryType_FindByExtID(RequestExtId) returns (Response) {}
rpc ContractCategoryType_Delete(RequestId) returns (Response) {}
rpc ContractCategoryType_Restore(RequestId) returns (Response) {}
//
rpc ContractWhiteItem_Read(RequestId) returns (Response) {}
rpc ContractWhiteItem_Create(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Update(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Save(RequestModel) returns (Response) {}
rpc ContractWhiteItem_Delete(RequestId) returns (Response) {}
rpc ContractWhiteItem_Restore(RequestId) returns (Response) {}
//
rpc Contract_Read(RequestId) returns (Response) {}
rpc Contract_Create(RequestModel) returns (Response) {}
rpc Contract_Update(RequestModel) returns (Response) {}
rpc Contract_Save(RequestModel) returns (Response) {}
rpc Contract_FindByExtID(RequestExtId) returns (Response) {}
rpc Contract_Delete(RequestId) returns (Response) {}
rpc Contract_Restore(RequestId) returns (Response) {}
//
rpc Court_Read(RequestId) returns (Response) {}
rpc Court_Create(RequestModel) returns (Response) {}
rpc Court_Update(RequestModel) returns (Response) {}
rpc Court_Save(RequestModel) returns (Response) {}
rpc Court_Delete(RequestId) returns (Response) {}
rpc Court_Restore(RequestId) returns (Response) {}
//
rpc DayType_Read(RequestId) returns (Response) {}
rpc DayType_Create(RequestModel) returns (Response) {}
rpc DayType_Update(RequestModel) returns (Response) {}
rpc DayType_Save(RequestModel) returns (Response) {}
rpc DayType_Delete(RequestId) returns (Response) {}
rpc DayType_Restore(RequestId) returns (Response) {}
//
rpc DebtType_Read(RequestId) returns (Response) {}
rpc DebtType_Create(RequestModel) returns (Response) {}
rpc DebtType_Update(RequestModel) returns (Response) {}
rpc DebtType_Save(RequestModel) returns (Response) {}
rpc DebtType_FindByExtID(RequestExtId) returns (Response) {}
rpc DebtType_Delete(RequestId) returns (Response) {}
rpc DebtType_Restore(RequestId) returns (Response) {}
//
rpc DirectionType_Read(RequestId) returns (Response) {}
rpc DirectionType_Create(RequestModel) returns (Response) {}
rpc DirectionType_Update(RequestModel) returns (Response) {}
rpc DirectionType_Save(RequestModel) returns (Response) {}
rpc DirectionType_Delete(RequestId) returns (Response) {}
rpc DirectionType_Restore(RequestId) returns (Response) {}
//
rpc DocumentLinkType_Read(RequestId) returns (Response) {}
rpc DocumentLinkType_Create(RequestModel) returns (Response) {}
rpc DocumentLinkType_Update(RequestModel) returns (Response) {}
rpc DocumentLinkType_Save(RequestModel) returns (Response) {}
rpc DocumentLinkType_Delete(RequestId) returns (Response) {}
rpc DocumentLinkType_Restore(RequestId) returns (Response) {}
//
rpc DocumentLink_Read(RequestId) returns (Response) {}
rpc DocumentLink_Create(RequestModel) returns (Response) {}
rpc DocumentLink_Update(RequestModel) returns (Response) {}
rpc DocumentLink_Save(RequestModel) returns (Response) {}
rpc DocumentLink_FindByExtID(RequestExtId) returns (Response) {}
rpc DocumentLink_Delete(RequestId) returns (Response) {}
rpc DocumentLink_Restore(RequestId) returns (Response) {}
//
rpc DocumentType_Read(RequestId) returns (Response) {}
rpc DocumentType_Create(RequestModel) returns (Response) {}
rpc DocumentType_Update(RequestModel) returns (Response) {}
rpc DocumentType_Save(RequestModel) returns (Response) {}
rpc DocumentType_FindByExtID(RequestExtId) returns (Response) {}
rpc DocumentType_Delete(RequestId) returns (Response) {}
rpc DocumentType_Restore(RequestId) returns (Response) {}
//
rpc Document_Read(RequestId) returns (Response) {}
rpc Document_Create(RequestModel) returns (Response) {}
rpc Document_Update(RequestModel) returns (Response) {}
rpc Document_Save(RequestModel) returns (Response) {}
rpc Document_FindByExtID(RequestExtId) returns (Response) {}
rpc Document_Delete(RequestId) returns (Response) {}
rpc Document_Restore(RequestId) returns (Response) {}
//
rpc Employee_FindByExtID(RequestExtId) returns (Response) {}
//
rpc EventType_Read(RequestId) returns (Response) {}
rpc EventType_Create(RequestModel) returns (Response) {}
rpc EventType_Update(RequestModel) returns (Response) {}
rpc EventType_Save(RequestModel) returns (Response) {}
rpc EventType_Delete(RequestId) returns (Response) {}
rpc EventType_Restore(RequestId) returns (Response) {}
//
rpc Event_Read(RequestId) returns (Response) {}
rpc Event_Create(RequestModel) returns (Response) {}
rpc Event_Update(RequestModel) returns (Response) {}
rpc Event_Save(RequestModel) returns (Response) {}
rpc Event_Delete(RequestId) returns (Response) {}
rpc Event_Restore(RequestId) returns (Response) {}
//
rpc Facsimile_Read(RequestId) returns (Response) {}
rpc Facsimile_Create(RequestModel) returns (Response) {}
rpc Facsimile_Update(RequestModel) returns (Response) {}
rpc Facsimile_Save(RequestModel) returns (Response) {}
rpc Facsimile_Delete(RequestId) returns (Response) {}
rpc Facsimile_Restore(RequestId) returns (Response) {}
//
rpc FileChange_Read(RequestId) returns (Response) {}
rpc FileChange_Create(RequestModel) returns (Response) {}
rpc FileChange_Update(RequestModel) returns (Response) {}
rpc FileChange_Save(RequestModel) returns (Response) {}
//
rpc FileTemplate_Read(RequestId) returns (Response) {}
rpc FileTemplate_Create(RequestModel) returns (Response) {}
rpc FileTemplate_Update(RequestModel) returns (Response) {}
rpc FileTemplate_Save(RequestModel) returns (Response) {}
rpc FileTemplate_Delete(RequestId) returns (Response) {}
rpc FileTemplate_Restore(RequestId) returns (Response) {}
//
rpc FileType_Read(RequestId) returns (Response) {}
rpc FileType_Create(RequestModel) returns (Response) {}
rpc FileType_Update(RequestModel) returns (Response) {}
rpc FileType_Save(RequestModel) returns (Response) {}
rpc FileType_Delete(RequestId) returns (Response) {}
rpc FileType_Restore(RequestId) returns (Response) {}
//
//
rpc GenderType_Read(RequestId) returns (Response) {}
rpc GenderType_Create(RequestModel) returns (Response) {}
rpc GenderType_Update(RequestModel) returns (Response) {}
rpc GenderType_Save(RequestModel) returns (Response) {}
rpc GenderType_Delete(RequestId) returns (Response) {}
rpc GenderType_Restore(RequestId) returns (Response) {}
//
rpc HashtagLink_Read(RequestId) returns (Response) {}
rpc HashtagLink_Create(RequestModel) returns (Response) {}
rpc HashtagLink_Update(RequestModel) returns (Response) {}
rpc HashtagLink_Save(RequestModel) returns (Response) {}
rpc HashtagLink_Delete(RequestId) returns (Response) {}
rpc HashtagLink_Restore(RequestId) returns (Response) {}
//
rpc Hashtag_Read(RequestId) returns (Response) {}
rpc Hashtag_Create(RequestModel) returns (Response) {}
rpc Hashtag_Update(RequestModel) returns (Response) {}
rpc Hashtag_Save(RequestModel) returns (Response) {}
rpc Hashtag_Delete(RequestId) returns (Response) {}
rpc Hashtag_Restore(RequestId) returns (Response) {}
//
rpc Individual_Read(RequestId) returns (Response) {}
rpc Individual_Create(RequestModel) returns (Response) {}
rpc Individual_Update(RequestModel) returns (Response) {}
rpc Individual_Save(RequestModel) returns (Response) {}
rpc Individual_FindByExtID(RequestExtId) returns (Response) {}
rpc Individual_Delete(RequestId) returns (Response) {}
rpc Individual_Restore(RequestId) returns (Response) {}
//
rpc InvoiceDebtTypeStat_Read(RequestId) returns (Response) {}
rpc InvoiceDebtTypeStat_Create(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Update(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Save(RequestModel) returns (Response) {}
rpc InvoiceDebtTypeStat_Delete(RequestId) returns (Response) {}
rpc InvoiceDebtTypeStat_Restore(RequestId) returns (Response) {}
//
rpc LawsuitInvoiceCorrection_Read(RequestId) returns (Response) {}
rpc LawsuitInvoiceCorrection_Create(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Update(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Save(RequestModel) returns (Response) {}
rpc LawsuitInvoiceCorrection_Delete(RequestId) returns (Response) {}
rpc LawsuitInvoiceCorrection_Restore(RequestId) returns (Response) {}
//
rpc LawsuitInvoice_Read(RequestId) returns (Response) {}
rpc LawsuitInvoice_Create(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Update(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Save(RequestModel) returns (Response) {}
rpc LawsuitInvoice_Delete(RequestId) returns (Response) {}
rpc LawsuitInvoice_Restore(RequestId) returns (Response) {}
//
rpc LawsuitPaymentCorrection_Read(RequestId) returns (Response) {}
rpc LawsuitPaymentCorrection_Create(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Update(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Save(RequestModel) returns (Response) {}
rpc LawsuitPaymentCorrection_Delete(RequestId) returns (Response) {}
rpc LawsuitPaymentCorrection_Restore(RequestId) returns (Response) {}
//
rpc LawsuitPayment_Read(RequestId) returns (Response) {}
rpc LawsuitPayment_Create(RequestModel) returns (Response) {}
rpc LawsuitPayment_Update(RequestModel) returns (Response) {}
rpc LawsuitPayment_Save(RequestModel) returns (Response) {}
rpc LawsuitPayment_Delete(RequestId) returns (Response) {}
rpc LawsuitPayment_Restore(RequestId) returns (Response) {}
//
rpc LawsuitReasonType_Read(RequestId) returns (Response) {}
rpc LawsuitReasonType_Create(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Update(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Save(RequestModel) returns (Response) {}
rpc LawsuitReasonType_Delete(RequestId) returns (Response) {}
rpc LawsuitReasonType_Restore(RequestId) returns (Response) {}
//
rpc LawsuitStageType_Read(RequestId) returns (Response) {}
rpc LawsuitStageType_Create(RequestModel) returns (Response) {}
rpc LawsuitStageType_Update(RequestModel) returns (Response) {}
rpc LawsuitStageType_Save(RequestModel) returns (Response) {}
rpc LawsuitStageType_Delete(RequestId) returns (Response) {}
rpc LawsuitStageType_Restore(RequestId) returns (Response) {}
//
//
//
rpc LawsuitType_Read(RequestId) returns (Response) {}
rpc LawsuitType_Create(RequestModel) returns (Response) {}
rpc LawsuitType_Update(RequestModel) returns (Response) {}
rpc LawsuitType_Save(RequestModel) returns (Response) {}
rpc LawsuitType_Delete(RequestId) returns (Response) {}
rpc LawsuitType_Restore(RequestId) returns (Response) {}
//
rpc Lawsuit_FindByExtID(RequestExtId) returns (Response) {}
//
rpc LegalType_Read(RequestId) returns (Response) {}
rpc LegalType_Create(RequestModel) returns (Response) {}
rpc LegalType_Update(RequestModel) returns (Response) {}
rpc LegalType_Save(RequestModel) returns (Response) {}
rpc LegalType_Delete(RequestId) returns (Response) {}
rpc LegalType_Restore(RequestId) returns (Response) {}
//
//
rpc MessageSendStatus_Read(RequestId) returns (Response) {}
rpc MessageSendStatus_Create(RequestModel) returns (Response) {}
rpc MessageSendStatus_Update(RequestModel) returns (Response) {}
rpc MessageSendStatus_Save(RequestModel) returns (Response) {}
rpc MessageSendStatus_Delete(RequestId) returns (Response) {}
rpc MessageSendStatus_Restore(RequestId) returns (Response) {}
//
//
//
rpc NotificationType_Read(RequestId) returns (Response) {}
rpc NotificationType_Create(RequestModel) returns (Response) {}
rpc NotificationType_Update(RequestModel) returns (Response) {}
rpc NotificationType_Save(RequestModel) returns (Response) {}
rpc NotificationType_Delete(RequestId) returns (Response) {}
rpc NotificationType_Restore(RequestId) returns (Response) {}
//
//
rpc OrganizationCategoryType_Read(RequestId) returns (Response) {}
rpc OrganizationCategoryType_Create(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_Update(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_Save(RequestModel) returns (Response) {}
rpc OrganizationCategoryType_FindByExtID(RequestExtId) returns (Response) {}
rpc OrganizationCategoryType_Delete(RequestId) returns (Response) {}
rpc OrganizationCategoryType_Restore(RequestId) returns (Response) {}
//
rpc OrganizationStateType_Read(RequestId) returns (Response) {}
rpc OrganizationStateType_Create(RequestModel) returns (Response) {}
rpc OrganizationStateType_Update(RequestModel) returns (Response) {}
rpc OrganizationStateType_Save(RequestModel) returns (Response) {}
rpc OrganizationStateType_Delete(RequestId) returns (Response) {}
rpc OrganizationStateType_Restore(RequestId) returns (Response) {}
//
rpc Organization_FindByExtID(RequestExtId) returns (Response) {}
//
rpc PaymentDay_Read(RequestId) returns (Response) {}
rpc PaymentDay_Create(RequestModel) returns (Response) {}
rpc PaymentDay_Update(RequestModel) returns (Response) {}
rpc PaymentDay_Save(RequestModel) returns (Response) {}
rpc PaymentDay_FindByExtID(RequestExtId) returns (Response) {}
rpc PaymentDay_Delete(RequestId) returns (Response) {}
rpc PaymentDay_Restore(RequestId) returns (Response) {}
//
rpc PaymentSchedule_Read(RequestId) returns (Response) {}
rpc PaymentSchedule_Create(RequestModel) returns (Response) {}
rpc PaymentSchedule_Update(RequestModel) returns (Response) {}
rpc PaymentSchedule_Save(RequestModel) returns (Response) {}
rpc PaymentSchedule_FindByExtID(RequestExtId) returns (Response) {}
rpc PaymentSchedule_Delete(RequestId) returns (Response) {}
rpc PaymentSchedule_Restore(RequestId) returns (Response) {}
//
rpc PenaltyCalculationItem_Read(RequestId) returns (Response) {}
rpc PenaltyCalculationItem_Create(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_Update(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_Save(RequestModel) returns (Response) {}
rpc PenaltyCalculationItem_FindByExtID(RequestExtId) returns (Response) {}
rpc PenaltyCalculationItem_Delete(RequestId) returns (Response) {}
rpc PenaltyCalculationItem_Restore(RequestId) returns (Response) {}
//
rpc PriorityType_Read(RequestId) returns (Response) {}
rpc PriorityType_Create(RequestModel) returns (Response) {}
rpc PriorityType_Update(RequestModel) returns (Response) {}
rpc PriorityType_Save(RequestModel) returns (Response) {}
rpc PriorityType_Delete(RequestId) returns (Response) {}
rpc PriorityType_Restore(RequestId) returns (Response) {}
//
rpc RepeatType_Read(RequestId) returns (Response) {}
rpc RepeatType_Create(RequestModel) returns (Response) {}
rpc RepeatType_Update(RequestModel) returns (Response) {}
rpc RepeatType_Save(RequestModel) returns (Response) {}
rpc RepeatType_Delete(RequestId) returns (Response) {}
rpc RepeatType_Restore(RequestId) returns (Response) {}
//
rpc ServiceProvider_Read(RequestId) returns (Response) {}
rpc ServiceProvider_Create(RequestModel) returns (Response) {}
rpc ServiceProvider_Update(RequestModel) returns (Response) {}
rpc ServiceProvider_Save(RequestModel) returns (Response) {}
rpc ServiceProvider_FindByExtID(RequestExtId) returns (Response) {}
rpc ServiceProvider_Delete(RequestId) returns (Response) {}
rpc ServiceProvider_Restore(RequestId) returns (Response) {}
//
rpc ServiceType_Read(RequestId) returns (Response) {}
rpc ServiceType_Create(RequestModel) returns (Response) {}
rpc ServiceType_Update(RequestModel) returns (Response) {}
rpc ServiceType_Save(RequestModel) returns (Response) {}
rpc ServiceType_FindByExtID(RequestExtId) returns (Response) {}
rpc ServiceType_Delete(RequestId) returns (Response) {}
rpc ServiceType_Restore(RequestId) returns (Response) {}
//
rpc StateDuty_Read(RequestId) returns (Response) {}
rpc StateDuty_Create(RequestModel) returns (Response) {}
rpc StateDuty_Update(RequestModel) returns (Response) {}
rpc StateDuty_Save(RequestModel) returns (Response) {}
rpc StateDuty_Delete(RequestId) returns (Response) {}
rpc StateDuty_Restore(RequestId) returns (Response) {}
//
rpc TableName_Read(RequestId) returns (Response) {}
rpc TableName_Create(RequestModel) returns (Response) {}
rpc TableName_Update(RequestModel) returns (Response) {}
rpc TableName_Save(RequestModel) returns (Response) {}
rpc TableName_Delete(RequestId) returns (Response) {}
rpc TableName_Restore(RequestId) returns (Response) {}
//
rpc UserRole_Read(RequestId) returns (Response) {}
rpc UserRole_Create(RequestModel) returns (Response) {}
rpc UserRole_Update(RequestModel) returns (Response) {}
rpc UserRole_Save(RequestModel) returns (Response) {}
rpc UserRole_Delete(RequestId) returns (Response) {}
rpc UserRole_Restore(RequestId) returns (Response) {}
//
rpc WhiteListReasonType_Read(RequestId) returns (Response) {}
rpc WhiteListReasonType_Create(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Update(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Save(RequestModel) returns (Response) {}
rpc WhiteListReasonType_Delete(RequestId) returns (Response) {}
rpc WhiteListReasonType_Restore(RequestId) returns (Response) {}
//
rpc Organization_Read(RequestId) returns (Response) {}
rpc Organization_Create(RequestModel) returns (Response) {}
@ -30,6 +559,8 @@ service Sync_service {
rpc File_Restore(RequestId) returns (Response) {}
rpc File_FindByFileID(RequestString) returns (Response) {}
rpc File_FindByFullName(RequestString) returns (Response) {}
rpc File_FindBy_TableNameID_TableRowID(RequestIdId) returns (ResponseMass) {}
rpc File_FindBy_TableNameID_TableRowID_FileTypeID(RequestIdIdId) returns (ResponseMass) {}
//
rpc OrganizationCasebook_Read(RequestId) returns (Response) {}
@ -124,7 +655,7 @@ service Sync_service {
// RequestId - параметры запроса на сервер
message RequestId {
uint32 VersionModel= 1; //версия структуры модели
int64 id = 2; // id записи в БД
int64 ID = 2; // id записи в БД
}
// RequestString - параметры запроса на сервер
@ -164,8 +695,16 @@ message RequestInnKpp {
// RequestId - параметры запроса на сервер
message RequestIdId {
uint32 VersionModel= 1; //версия структуры модели
int64 id1 = 2; // id записи в БД
int64 id2 = 3; // id записи в БД
int64 ID1 = 2; // id записи в БД
int64 ID2 = 3; // id записи в БД
}
// RequestIdIdId - параметры запроса на сервер
message RequestIdIdId {
uint32 VersionModel= 1; //версия структуры модели
int64 ID1 = 2; // id записи в БД
int64 ID2 = 3; // id записи в БД
int64 ID3 = 4; // id записи в БД
}
@ -184,3 +723,8 @@ message ResponseFloat64 {
message ResponseEmpty {
}
// Response - параметры ответа на клиент
message ResponseMass {
repeated string MassModelString = 1; //массив объект-модель в формате json
}

View File

@ -28,7 +28,7 @@ func (s *ServerGRPC) LawsuitStatusType_Read(ctx context.Context, Request *grpc_p
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Read()
if err != nil {
return &Otvet, err
@ -65,7 +65,7 @@ func (s *ServerGRPC) LawsuitStatusType_Delete(ctx context.Context, Request *grpc
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Delete()
if err != nil {
return &Otvet, err
@ -102,7 +102,7 @@ func (s *ServerGRPC) LawsuitStatusType_Restore(ctx context.Context, Request *grp
//запрос в БД
Model := &lawsuit_status_types.LawsuitStatusType{}
Model.ID = Request.Id
Model.ID = Request.ID
err = Model.Restore()
if err != nil {
return &Otvet, err

View File

@ -18,7 +18,7 @@ func Test_server_LawsuitStatusType_Read(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -37,7 +37,7 @@ func Test_server_LawsuitStatusType_Delete(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -85,7 +85,7 @@ func Test_server_LawsuitStatusType_Update(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -121,7 +121,7 @@ func Test_server_LawsuitStatusType_Save(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}
@ -155,7 +155,7 @@ func Test_server_LawsuitStatusType_FindByExtID(t *testing.T) {
ctx := context.Background()
Request := grpc_proto.RequestId{}
Request.Id = LawsuitStatusType_ID_Test
Request.ID = LawsuitStatusType_ID_Test
Request.VersionModel = lawsuit_status_types.LawsuitStatusType{}.GetStructVersion()
server1 := &ServerGRPC{}

View File

@ -0,0 +1,12 @@
package crud_starter_lawsuit_status_types
import (
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
)
// SetCrudInterface - заполняет интерфейс crud: DB, GRPC, NRPC
func SetCrudInterface(crud lawsuit_status_types.ICrud_LawsuitStatusType) {
lawsuit_status_types.Crud_LawsuitStatusType = crud
return
}

View File

@ -0,0 +1,12 @@
package starter_crud_starter_lawsuit_status_types
import (
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/db/crud/crud_lawsuit_status_types"
"testing"
)
func TestSetCrudInterface(t *testing.T) {
crud := crud_lawsuit_status_types.Crud_DB{}
SetCrudInterface(crud)
}

View File

@ -42,7 +42,7 @@ func (crud Crud_GRPC) Read(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()
@ -214,7 +214,7 @@ func (crud Crud_GRPC) Delete(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()
@ -254,7 +254,7 @@ func (crud Crud_GRPC) Restore(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
ctxMain := context.Background()

View File

@ -1,7 +1,7 @@
package grpc_lawsuit_status_types
import (
config "github.com/ManyakRus/starter/config_main"
"github.com/ManyakRus/starter/config_main"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/grpc/grpc_client"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
"testing"

View File

@ -40,7 +40,7 @@ func (crud Crud_NRPC) Read(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос
@ -196,7 +196,7 @@ func (crud Crud_NRPC) Delete(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос
@ -232,7 +232,7 @@ func (crud Crud_NRPC) Restore(m *lawsuit_status_types.LawsuitStatusType) error {
var VersionModel = crud.GetVersionModel()
Request := &grpc_proto.RequestId{}
Request.Id = int64(m.ID)
Request.ID = int64(m.ID)
Request.VersionModel = VersionModel
// запрос

View File

@ -1,7 +1,7 @@
package nrpc_lawsuit_status_types
import (
config "github.com/ManyakRus/starter/config_main"
"github.com/ManyakRus/starter/config_main"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/network/nrpc/nrpc_client"
"gitlab.aescorp.ru/dsp_dev/claim/sync_service/pkg/object_model/entities/lawsuit_status_types"
"testing"

View File

@ -11,8 +11,8 @@ import (
// versionLawsuitStatusType - версия структуры модели, с учётом имен и типов полей
var versionLawsuitStatusType uint32
// crud_LawsuitStatusType - объект контроллер crud операций
var crud_LawsuitStatusType ICrud_LawsuitStatusType
// Crud_LawsuitStatusType - объект контроллер crud операций
var Crud_LawsuitStatusType ICrud_LawsuitStatusType
// интерфейс стандартных CRUD операций, для использования в DB или GRPC или NRPC
type ICrud_LawsuitStatusType interface {
@ -92,84 +92,84 @@ func (m LawsuitStatusType) GetJSON() (string, error) {
// Read - находит запись в БД по ID, и заполняет в объект
func (m *LawsuitStatusType) Read() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Read(m)
err := Crud_LawsuitStatusType.Read(m)
return err
}
// Save - записывает объект в БД по ID
func (m *LawsuitStatusType) Save() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Save(m)
err := Crud_LawsuitStatusType.Save(m)
return err
}
// Update - обновляет объект в БД по ID
func (m *LawsuitStatusType) Update() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Update(m)
err := Crud_LawsuitStatusType.Update(m)
return err
}
// Create - создаёт объект в БД с новым ID
func (m *LawsuitStatusType) Create() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Create(m)
err := Crud_LawsuitStatusType.Create(m)
return err
}
// Delete - устанавливает признак пометки удаления в БД
func (m *LawsuitStatusType) Delete() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Delete(m)
err := Crud_LawsuitStatusType.Delete(m)
return err
}
// Restore - снимает признак пометки удаления в БД
func (m *LawsuitStatusType) Restore() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Restore(m)
err := Crud_LawsuitStatusType.Restore(m)
return err
}
// Find_ByExtID - находит объект по ExtID
func (m *LawsuitStatusType) Find_ByExtID() error {
if crud_LawsuitStatusType == nil {
if Crud_LawsuitStatusType == nil {
return constants.ErrorCrudIsNotInit
}
err := crud_LawsuitStatusType.Find_ByExtID(m)
err := Crud_LawsuitStatusType.Find_ByExtID(m)
return err
}
// SetCrudInterface - заполняет интерфейс crud: DB, GRPC, NRPC
func (m LawsuitStatusType) SetCrudInterface(crud ICrud_LawsuitStatusType) {
crud_LawsuitStatusType = crud
Crud_LawsuitStatusType = crud
return
}

View File

@ -199,8 +199,10 @@ func BoolFromString(s string) bool {
func LoadSettingsTxt() {
var err error
Fill_TEMPLATES_FOLDER_NAME()
DirBin := micro.ProgramDir_bin()
Dir := DirBin + constants.SETTINGS_FOLDER_NAME + micro.SeparatorFile()
Dir := DirBin + constants.TEMPLATES_FOLDER_NAME + micro.SeparatorFile() + constants.CONFIG_FOLDER_NAME + micro.SeparatorFile()
FilenameEnv := Dir + ".env"
err = ConfigMain.LoadEnv_from_file_err(FilenameEnv)
if err == nil {
@ -214,3 +216,16 @@ func LoadSettingsTxt() {
}
}
// Fill_TEMPLATES_FOLDER_NAME - заполняет переменную TEMPLATES_FOLDER_NAME = "templates_main" или "templates"
func Fill_TEMPLATES_FOLDER_NAME() {
DirBin := micro.ProgramDir_bin()
FileName := DirBin + "templates_main"
ok, err := micro.FileExists(FileName)
if err != nil {
log.Panic("FileExists() ", FileName, " error: ", err)
}
if ok == true {
constants.TEMPLATES_FOLDER_NAME = "templates_main"
}
}

View File

@ -12,12 +12,14 @@ Need fill settings in settings.txt file
const FILE_PERMISSIONS = 0666
var TEMPLATES_FOLDER_NAME = "templates"
const CONFIG_FOLDER_NAME = "configs_"
const TemplateFilenameCrudGo = "crud.go_"
const TemplateFilenameCrudGoTest = "crud_test.go_"
const SETTINGS_FOLDER_NAME = "templates/configs_"
//const SETTINGS_FOLDER_NAME = "templates/configs_"
const GENERATION_PROTO_FILENAME = "generation_code.sh"

View File

@ -778,3 +778,18 @@ func DeleteFuncTestFind_byExtID(Text string, Table1 *types.Table) string {
return Otvet
}
// DeleteEmptyLines - удаляет пустые строки
func DeleteEmptyLines(Text string) string {
Otvet := Text
Otvet = strings.ReplaceAll(Otvet, "\n\n\n", "\n\n")
Otvet = strings.ReplaceAll(Otvet, "\n//\n\n", "\n\n")
Otvet = strings.ReplaceAll(Otvet, "\n\t//\n\n", "\n\n")
//Otvet = strings.ReplaceAll(Otvet, "\r\r", "\r")
//Otvet = strings.ReplaceAll(Otvet, "\r\n", "\n")
pos1 := strings.Index(Otvet, "\n\n\n")
if pos1 >= 0 {
Otvet = DeleteEmptyLines(Otvet)
}
return Otvet
}

View File

@ -100,6 +100,9 @@ func CreateFileProto(MapAll map[string]*types.Table) error {
//
TextProto = TextProto[:PosStart] + TextProtoNew + TextProto[PosStart:]
//
TextProto = create_files.DeleteEmptyLines(TextProto)
//запись файла
err = os.WriteFile(FilenameReadyProto, []byte(TextProto), constants.FILE_PERMISSIONS)
@ -120,7 +123,7 @@ func CreateFileProto(MapAll map[string]*types.Table) error {
// FindTextProtoTable1 - возвращает текст всех функций .proto для таблицы
func FindTextProtoTable1(TextProto string, Table1 *types.Table) string {
Otvet := "\n\t//\n"
Otvet := "\n" //"\n\t//\n"
ModelName := Table1.NameGo
Otvet = Otvet + FindTextRead(TextProto, ModelName)
@ -298,7 +301,7 @@ func TextRestore(ModelName string) string {
// TextFindByExtId - возвращает текст .proto
func TextFindByExtId(ModelName string) string {
Otvet := "rpc " + ModelName + "_FindByExtID(RequestExtId) returns (Response) {}"
Otvet := "rpc " + ModelName + "_FindByExtID(RequestExtID) returns (Response) {}"
return Otvet
}