Created
September 12, 2013 22:08
-
-
Save mishak87/6544515 to your computer and use it in GitHub Desktop.
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
<?php | |
/** @Entity */ | |
class Product { | |
/** @Column */ | |
protected $code; | |
/** @OneToMany(ProductPricemap) */ | |
protected $prices; | |
} | |
class PriceList { | |
/** @Column */ | |
protected $name; | |
/** @Column(type="currency") */ | |
protected $currency; | |
} | |
class ProductPrice_Map { | |
/** @ManyToOne(Product) */ | |
protected $product; | |
/** @ManyToOne(PriceList) */ | |
protected $priceList; | |
/** @Column(type="price", currencyIn="priceList"[, currencyProperty="currency"]) */ | |
protected $amount; | |
} |
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
<?php | |
/** @Entity */ | |
class Product { | |
/** @Column */ | |
protected $code; | |
/** @OneToMany(ProductPrice) */ | |
protected $prices; | |
} | |
class ProductPrice { | |
/** @ManyToOne(Product) */ | |
protected $product; | |
/** @Column(type="price") */ | |
protected $price; | |
} |
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
product: | |
- code | |
price_list: | |
- name | |
- currency [char(3)] | |
product_price_map: | |
- product_id (ref) | |
- price_list_id (ref) | |
- amount [decimal(10,2)] |
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
product: | |
- code | |
product_price: | |
- product_id (ref) | |
- price_amount [decimal(10,2)] | |
- price_currency [char(3)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment