This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// HelloAnimation | |
// | |
// Created by JK on 19/04/2018. | |
// Copyright © 2018 JK. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.swift | |
// HugeLadderGame | |
// | |
// Created by JK on 21/08/2018. | |
// Copyright © 2018 codesquad. All rights reserved. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Entity { | |
var name : String = "" | |
init(name : String) { | |
self.name = name | |
} | |
} | |
class Order { | |
private (set) var id = UUID() | |
private (set) var date = Date() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customer : | |
Entity, | |
AggregateProtocol | |
{ | |
private (set) var id : UUID | |
private (set) var email : String | |
private var orders : Array<Order> | |
//...중간생략... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product { | |
private var id = UUID() | |
} | |
class CustomOrderRequest { | |
private (set) var products = [Product]() | |
} | |
protocol OrderCommand { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol CustomerRepositoryProtocol { | |
} | |
protocol ProductRepositoryProtocol { | |
} | |
struct ConversionRate { | |
var fromCurrency : String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomerOrderController { | |
private (set) var orderService : OrderService | |
init(service: OrderService) { | |
self.orderService = service | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomOrderRequest { | |
private (set) var products = [Product]() | |
} | |
protocol OrderCommand { | |
// | |
} | |
protocol OrderManagerProtocol { | |
func send(command : OrderCommand) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customer : | |
Entity, | |
AggregateProtocol | |
{ | |
private (set) var id : UUID | |
private (set) var email : String | |
private var orders : Array<Order> | |
init?(email : String, name : String, uniqueChecker : CustomerUniqueCheckerDelegate) { | |
id = UUID.init() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol CustomerRepositoryProtocol { | |
} | |
protocol ProductRepositoryProtocol { | |
} | |
struct ConversionRate { | |
var fromCurrency : String |