feat: split Templates table into 3 purpose-specific tables + email-api-data project #24
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Split the single
myAi.Templatestable (which mixes email, AI prompt, and HTML page templates) into 3 tables each owned by the service that uses them. Add a proper data layer toemail-api. MoveHtmlShellStart/HtmlShellEndinto the DB. Replace config-basedContact:ToEmailoperator-copy with a DB column.Why
cv-matcher-apireads AI prompts from the wrong schema (myAi)email-apihas no DB — its HTML shell is a hardcoded constantemail-apihas no repository pattern (unlikecv-matcher-api)Contact:ToEmail) requires a config change + redeploy to updateScope
email-api-data:EmailApiDbContext(emailApischema),EmailTemplatestable,IEmailTemplateRepository/EfEmailTemplateRepository,IEmailTemplateService/EmailTemplateServiceOperatorCopycolumn onEmailTemplates: seeded withcontact@myai.ro; new rows default""and inherit at runtime from first non-empty entryemail-api: wireemail-api-data; load html shell from DB templates; remove hardcoded constantsapi: addIEmailTemplateService; use it inEmailApiEmailSenderforemail.*+ operator copycv-search-job: addIEmailTemplateService; removeMyAiDbContext; removeContact:ToEmailconfigcv-matcher-data: newAiPromptstable +IAiPromptsRepository/EfAiPromptsRepositoryincv-matcher-api;cv-matcher-apiremovesMyAiDbContextmyai-data: cleanup migration removesemail.*+ai.*rowsSuccess criteria
dotnet build myAi.sln— 0 errorscv-matcher-api.csprojhas nomyai-datareferenceemail-apihas no hardcoded HTML constantscv-search-jobdocker-compose has noContact__ToEmailenv var