erp-platform/api
Sedat ÖZTÜRK 6e3f58ce9d Grid ve Form komponentlerine Script özelliği
FormView, FormNew, Grid Popup için Script özelliği eklendi. Ayrıca itemlara buton eklenebiliyor.
Sadece textbox olan inputlara ekleniyor. Diğer komponenler için render özelliği kullanılması gerekiyor.
2025-09-24 20:46:03 +03:00
..
modules Menü düzenlemesi 2025-08-18 11:14:23 +03:00
src Grid ve Form komponentlerine Script özelliği 2025-09-24 20:46:03 +03:00
test url değişimi 2025-05-06 14:03:45 +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 init project 2025-05-06 09:45:49 +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
global.json init project 2025-05-06 09:45:49 +03:00
Kurs.Platform.DbMigrator.Dockerfile init project 2025-05-06 09:45:49 +03:00
Kurs.Platform.HttpApi.Host.Dockerfile init project 2025-05-06 09:45:49 +03:00
Kurs.Platform.sln init project 2025-05-06 09:45:49 +03:00
Kurs.Platform.sln.DotSettings init project 2025-05-06 09:45:49 +03:00
migrate-database.ps1 init project 2025-05-06 09:45:49 +03:00
NuGet.Config init project 2025-05-06 09:45:49 +03:00
README.md Public Api to Custom Endpoints 2025-07-27 21:57:19 +03:00
sample_data.sql init project 2025-05-06 09:45:49 +03:00

Yeni Modul Ekleme

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

Code Format

dotnet format --include .\modules\Kurs.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. 'Kurs 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