1: <?php
2:
3: namespace Thelia\Model\map;
4:
5: use \RelationMap;
6: use \TableMap;
7:
8:
9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20:
21: class ProductVersionTableMap extends TableMap
22: {
23:
24: 25: 26:
27: const CLASS_NAME = 'Thelia.Model.map.ProductVersionTableMap';
28:
29: 30: 31: 32: 33: 34: 35:
36: public function initialize()
37: {
38:
39: $this->setName('product_version');
40: $this->setPhpName('ProductVersion');
41: $this->setClassname('Thelia\\Model\\ProductVersion');
42: $this->setPackage('Thelia.Model');
43: $this->setUseIdGenerator(false);
44:
45: $this->addForeignPrimaryKey('id', 'Id', 'INTEGER' , 'product', 'id', true, null, null);
46: $this->addColumn('tax_rule_id', 'TaxRuleId', 'INTEGER', false, null, null);
47: $this->addColumn('ref', 'Ref', 'VARCHAR', true, 255, null);
48: $this->addColumn('price', 'Price', 'FLOAT', true, null, null);
49: $this->addColumn('price2', 'Price2', 'FLOAT', false, null, null);
50: $this->addColumn('ecotax', 'Ecotax', 'FLOAT', false, null, null);
51: $this->addColumn('newness', 'Newness', 'TINYINT', false, null, 0);
52: $this->addColumn('promo', 'Promo', 'TINYINT', false, null, 0);
53: $this->addColumn('stock', 'Stock', 'INTEGER', false, null, 0);
54: $this->addColumn('visible', 'Visible', 'TINYINT', true, null, 0);
55: $this->addColumn('weight', 'Weight', 'FLOAT', false, null, null);
56: $this->addColumn('position', 'Position', 'INTEGER', true, null, null);
57: $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
58: $this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
59: $this->addPrimaryKey('version', 'Version', 'INTEGER', true, null, 0);
60: $this->addColumn('version_created_at', 'VersionCreatedAt', 'TIMESTAMP', false, null, null);
61: $this->addColumn('version_created_by', 'VersionCreatedBy', 'VARCHAR', false, 100, null);
62:
63: }
64:
65: 66: 67:
68: public function buildRelations()
69: {
70: $this->addRelation('Product', 'Thelia\\Model\\Product', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null);
71: }
72:
73: }
74: