- Seeddata -> ya'ni dasturda default qiymat mavjud.
- Hashing password -> databazaga password hashlanib tushadi.
- Configuration -> har bir table uchun alohida sozlamalari mavjud.
- Table'lar bir-biriga relation bo'lgan.
- Login qismida tasdiqlash uchun email'ga xabar jo'natadi.
- Password va Email uchun regex ishlatilgan
- Loyihada user-secret texnalogiyasi orqali turlixildagi appsettings.json ichidagi tarqalishi mumkin bo'lmagan ma'lumotlar yashirilgan uni sozlash uchun yoriqnomaga amal qiling
Exam.StockManagement.APi'ga terminal orqali kirilib. Ushbi buyrug'lar kiritiladi.
dotnet user-secrets init
dotnet user-secrets set "JWT:ValidIssuer" "127.0.0.1"
dotnet user-secrets set "JWT:ValidAudience" "StockManagement"
dotnet user-secrets set "JWT:Secret" "Your Secret Kod 32dan oshishi kerak"
dotnet user-secrets set "JWT:ExpireDate" "1000"
dotnet user-secrets set "EmailSettings:SenderName" "Najot Ta'lim"
dotnet user-secrets set "EmailSettings:Sender" "app yaratilgan email kiritilishi kerak"
dotnet user-secrets set "EmailSettings:Password" "appdagi kalit kiritilishi kerak"
dotnet user-secrets set "EmailSettings:MailServer" "smtp.gmail.com"
dotnet user-secrets set "EmailSettings:MailPort" "587"
dotnet user-secrets set "ConnectionStrings:StockManagementConnectionString" "Host=localhost;Port=5432;Username=postgres;Password=DatabasePassword;Database=TesDBProduct;"
dotnet user-secrets set "AllowedHosts" "*"
Ushbu controller user'larni ro'yhatga olish va user yokida adminligiga qarab ruhsatlarni berish uchun hizmat qiladi
Bu yerga product'larni turlari kiritiladi
Email uchun validation
Password uchun validation