CHAP04 - DDD-START/ONLINE-STUDY GitHub Wiki

1. 환경 구성

1. git: https://github.com/madvirus/ddd-start

2. 프로세스

1. git fork

2. docker install

3. move project dir root

4. docker compose execute command

5. init sql execute


2. 데모

1. Article

test: JpaArticleRepositoryIntTest

entity:

- Article
	- ArticleContent

jpa:

- @SecondaryTable

- @AttributeOverrides
	- @AttributeOverride
- @Embedded

- @Embeddable

query:

SELECT * FROM shop.article;
SELECT * FROM shop.article_content;

Product

test: JpaProductRepositoryIntTest

entity:

- Product
	- CategoryId
	- Image
		- ExternalImage
		- InternalImage

jpa:

- @EmbeddedId

- @ElementCollection
- @CollectionTable

- @Convert

- @OrderColumn

- @Inheritance
- @DiscriminatorValue
	- @DiscriminatorValue

query:

SELECT * FROM shop.product;
SELECT * FROM shop.category;
SELECT * FROM shop.image;

3. Order

test: JpaOrderRepositoryIntTest

entity:

- Order
	- OrderNo
	- Orderer
	- Money
	- ShippingInfo
		- Address
		- Receiver

jpa:

- @EmbeddedId
- @Embeddable

- @ElementCollection
- @CollectionTable

query:

SELECT * FROM shop.purchase_order;
SELECT * FROM shop.order_line;