The Clean Architecture in php



Download 2,26 Mb.
Pdf ko'rish
bet165/179
Sana24.06.2021
Hajmi2,26 Mb.
#100337
1   ...   161   162   163   164   165   166   167   168   ...   179
Bog'liq
The-Clean-Architecture-in-PHP-Kristopher-Wilson

Customers.dcm.yml
This file,
CleanPhp.Invoicer.Domain.Entity.Customer.dcm.yml
dictates mapping information
for the
Customer
entity:
CleanPhp\Invoicer\Domain\Entity\Customer:
type: entity
table: customers
id:
id:
type: bigint
generator:
strategy: IDENTITY
fields:
name:
length: 100
email:
length: 50
Order.dcm.yml
This file,
CleanPhp.Invoicer.Domain.Entity.Order.dcm.yml
dictates mapping information for
the
Order
entity:
CleanPhp\Invoicer\Domain\Entity\Order:
type: entity
table: orders
id:
id:
type: bigint
generator:
strategy: IDENTITY
fields:
orderNumber:
column: order_number
length: 20
description:
total:
type: decimal
precision: 10
scale: 2
manyToOne:
customer:
targetEntity: CleanPhp\Invoicer\Domain\Entity\Customer
inversedBy: orders


Doctrine 2
203
Invoice.dcm.yml
This file,
CleanPhp.Invoicer.Domain.Entity.Invoice.dcm.yml
dictates mapping information
for the
Invoice
entity:
CleanPhp\Invoicer\Domain\Entity\Invoice:
type: entity
table: invoices
id:
id:
type: bigint
generator:
strategy: IDENTITY
fields:
invoiceDate:
column: invoice_date
type: date
total:
type: decimal
precision: 10
scale: 2
manyToOne:
order:
targetEntity: CleanPhp\Invoicer\Domain\Entity\Order
inversedBy: invoices
This would make a good place to commit your code to source control.
If you’re just reading, but want to see the code in action, you can checkout the tag
10-doctrine-repo-mappings:
git clone https://github.com/mrkrstphr/cleanphp-example.git
git checkout 10-doctrine-repo-mappings

Download 2,26 Mb.

Do'stlaringiz bilan baham:
1   ...   161   162   163   164   165   166   167   168   ...   179




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish