erp-platform/api
2025-12-06 02:07:26 +03:00
..
.config dockerfile ve abpconfig 2025-11-21 00:03:24 +03:00
modules Sql Query Manager yapılandırıldı. 2025-12-06 01:38:21 +03:00
src Sql Query Manager yapılandırıldı. 2025-12-06 01:38:21 +03:00
test kurs-platform -> erp-platform 2025-11-11 22:49:52 +03:00
.dockerignore init project 2025-05-06 09:45:49 +03:00
.editorconfig init project 2025-05-06 09:45:49 +03:00
.gitattributes init project 2025-05-06 09:45:49 +03:00
.gitignore kurs-platform -> erp-platform 2025-11-11 22:49:52 +03:00
.prettierrc init project 2025-05-06 09:45:49 +03:00
common.props init project 2025-05-06 09:45:49 +03:00
Erp.Platform.DbMigrator.Dockerfile Erp.SqlQueryManager için Dockerfile 2025-12-06 02:07:26 +03:00
Erp.Platform.HttpApi.Host.Dockerfile Erp.SqlQueryManager için Dockerfile 2025-12-06 02:07:26 +03:00
Erp.Platform.sln Sql Query Manager 2025-12-05 11:56:53 +03:00
Erp.Platform.sln.DotSettings kurs-platform -> erp-platform 2025-11-11 22:49:52 +03:00
global.json init project 2025-05-06 09:45:49 +03:00
migrate-database.ps1 kurs-platform -> erp-platform 2025-11-11 22:49:52 +03:00
NuGet.Config init project 2025-05-06 09:45:49 +03:00
README.md Supply Chain Düzenleme 2025-11-13 14:06:16 +03:00

Yeni Modul Ekleme

abp new Erp.Notification -t module --no-ui -m none --database-provider ef --version 7.2.2 --old

Code Format

dotnet format --include .\modules\Erp.Notification\ --folder

Migrations

  • Yeni migration ekleme EntityFrameworkCore projesine gir dotnet ef migrations add "" dotnet ef database update

  • Son migrationi siler ve snapshot revert eder dotnet ef migrations remove dotnet ef database update "20240822114716_ABP_822"

  • SQL Veritabanını Entity Class oluştur. dotnet ef dbcontext scaffold "Server=SERVERNAME;Database=DBNAME;User ID=USERNAME;Password=PASSWORD;TrustServerCertificate=True;" Microsoft.EntityFrameworkCore.SqlServer --context MyDbContext --output-dir Models --data-annotations --force

Custom Endpoints

Token İsteği Örnek:
POST /connect/token HTTP/1.1
Host: localhost:44344
Content-Type: application/x-www-form-urlencoded

username=system%40sozsoft.com
&password=...
&grant_type=password
&client_id=Platform_PublicApi
&scope=offline_access%20Platform

Whatsapp Ayarları

  • Normal facebook üyeliği yapılır.
  • https://developers.facebook.com/ sitesinden yeni developer üyeliği oluşturulur. Developer üyeliği seçilir.
  • CreateApp butonu ile yeni uygulama oluşturulur. Uygulama adı belirlenir. 'Erp Messenger'
  • AppType olarak İşletme seçilir ve App oluşturulur.
  • Add Products kısmında WhatsApp seçilir ve Business Account oluşturulur.
  • 3 noktadan (menüden) WhatsApp Manager sayfasına gidilir. Manage Templates seçilir, istenirse yeni template oluşturulur. 'hello_world'
  • WhatsApp Manager üzerinde menüden Settings -> Users -> System Users eklenir. Kullanıcı adı 'admin' ve Role ise 'Admin' seçilir.
  • Eklenen 'admin' kullanıcısında 'Assign Assets' seçilir ve full yetki verilir.
  • admin kullanıcısı üzerinden 'Generate Token' seçilir ve aşağıdaki yetkiler verilir.
- whatsapp_business_management'
- 'whatsapp_business_messaging'
  • WhatsApp -> API Setup kısmından "From" kısmında yeni telefon numarası eklenir.

  • WhatsApp -> API Setup kısmından Generate Access Token oluşturulur.

  • token: EAASM83pDJf0BO0ZCYBr3Fx4SES0ox8XiZCgP3FIteprYpwawZCkGYjpMlKk4OZCWgRNZC2Ttofgf8amMf929ZBuDcgYIOsXkPMGBNmVxm2czipzq63LmtbYfyCWsKVy0q1jtay0nRoeDuO2FKhqCfLLtNn9cSWjINVLcz26ptK8a2Oko83cZBzrNsp3cpIECnzqRfEjHdEz1U73y3ZB1MZBOhHilax7yZALf4ZA1Tmk

  • WhatsApp telefon numarasını Register etmek için aşağıdaki postman Curl gönderilir.

  curl --location 'https://graph.facebook.com/v21.0/521106361082067/register' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <access token>' \
  --data '{
    "messaging_product": "whatsapp",
    "pin": "238567"
  }'
{
    "messaging_product": "whatsapp",
    "to": "{+gönderilecek gsm numarası}",
    "type": "template",
    "template": {
        "name": "{message_template_name}",
        "language": {
            "code": "en"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "Test mesajı"
                    }
                ]
            }
        ]
    }
}

ABP Update