@@ -82,16 +82,41 @@ class Product(Reflector):
82
82
variant : Variant
83
83
brand : Brand
84
84
85
+ def __init__ (self , brand : Brand , cloth : Cloth , variant : Color ) -> None :
86
+ super ().__init__ ()
87
+ self .brand = brand
88
+ self .cloth = cloth
89
+ self .variant = variant
90
+
85
91
86
92
V = {
87
- 1001 : Variant (Size .FREE_SIZE ,Color .BLACK ),
88
- 1002 : Variant (Size .FREE_SIZE ,Color .GRAY ),
89
- 1003 : Variant (Size .MEDIUM ,Color .BLACK ),
90
- 1004 : Variant (Size .MEDIUM ,Color .BLUE ),
91
- 1005 : Variant (Size .X_LARGE ,Color .MULTICOLOR ),
92
- 1006 : Variant (Size .X_SMALL ,Color .MULTICOLOR ),
93
+ 1001 : Variant (Size .FREE_SIZE , Color .BLACK ),
94
+ 1002 : Variant (Size .FREE_SIZE , Color .GRAY ),
95
+ 1003 : Variant (Size .MEDIUM , Color .BLACK ),
96
+ 1004 : Variant (Size .MEDIUM , Color .BLUE ),
97
+ 1005 : Variant (Size .X_LARGE , Color .MULTICOLOR ),
98
+ 1006 : Variant (Size .X_SMALL , Color .MULTICOLOR ),
93
99
}
94
100
95
- C = {
96
- 2001 :Cloth ("Round Hat" ,Type .HAT )
101
+
102
+ C = {
103
+ 2001 : Cloth ("Round" , Type .HAT ),
104
+ 2002 : Cloth ("Cowboy" , Type .HAT ),
105
+ 2003 : Cloth ("Cap" , Type .HAT ),
106
+ 2004 : Cloth ("Long" , Type .SHIRT ),
107
+ 2005 : Cloth ("Long" , Type .SKIRT ),
97
108
}
109
+
110
+
111
+ L = [
112
+ Product (Brand .BRAND_A , C [2003 ], V [1003 ]),
113
+ Product (Brand .BRAND_A , C [2003 ], V [1004 ]),
114
+ Product (Brand .BRAND_B , C [2004 ], V [1003 ]),
115
+ Product (Brand .BRAND_B , C [2005 ], V [1003 ]),
116
+ Product (Brand .BRAND_C , C [2004 ], V [1005 ]),
117
+ Product (Brand .BRAND_C , C [2005 ], V [1006 ]),
118
+ ]
119
+
120
+
121
+ for product in L :
122
+ print (product )
0 commit comments