3

\7<                 @   sZ   d dl mZ d dlmZmZ d dlZd dlmZ d dl	Zd dl
mZ G dd dejZdS )    )unicode_literals)models
migrationsN)Decimal)settingsc               @   s  e Zd ZdejejgZejdde	j
dddddfd	e	jd
dddddddddgdfdej	jjddddddfd e	jd!dd"dd#fd$ej	jjdd%d&d'd(fgd)dd*e	jfd+ejd,de	j
dddddfd	e	jd
dddddgdfdej	jjddddddfd$ej	jjdd%d&d'd(fgd2d,d*e	jfd+ejd3de	j
dddddfd4e	jd5ddd6d7fd8ej	jjjd4dd9dddd:fd;e	jd<d=dd>fd?e	jd@dd
ddddgdHfdIe	jdJdKdLdMfdNe	jdOdPdQdRfdSe	jddTddUfdVe	jdWddXdd#fdYe	jdZdd[dd#fd\e	jd]dd^dd#fd_e	jd`ddadd#fdbe	jdcdddddddefdfe	jedgdddhdifdje	jdOdkdlfdme	jdOdndlfdoej	jjdpddqfdre	jddsdtfdue	jddve	jdwfdxe	jd,dye	jdwfgdzgd{d|d}e	jfd+ejd~de	j
dddddfd4e	jddd5dfd8ej	jjjd4dd9dddd:fd;e	jddfde	jddddRfde	jdddlfd$ej	jjdd%d&d'd(fdre	jddsdtfde	jdddddfde	jdddddfde	jdddddfgdd~d*e	jfd+ejdde	j
dddddfde	jdOdfde	jde	jdfde	jde	jdfgi e	jfd+ejdde	j
dddddfde	jd'ddfde	jddfde	jdddtfdIe	jdddLdddgdHfde	jd'dddfde	jdddfde	jdddfde	jdddfde	jdddfde	jd~dde	jdfde	jdeje	jdwfgdddd}e	jfd+ejdedgdej dde	jddddddddej dxde	jdd~dde	jdddej dude	jdd~dde	jdddejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddid d+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+ejdg ddddŜdd+gZ!d&S (  	Migration	catalogue0001_initialBenefitidTFID)auto_createdprimary_key	serializeverbose_nametypeType   
Percentage3Discount is a percentage off of the product's valueAbsolute5Discount is a fixed amount off of the product's valueMultibuy1Discount is to give the cheapest product for freeFixed price:Get the products that meet the condition for a fixed priceShipping absolute/Discount is a fixed amount of the shipping costShipping fixed priceGet shipping for a fixed priceShipping percentage1Discount is a percentage off of the shipping cost)r   
max_lengthblankchoicesvalue      Value)
max_digitsdecimal_placesr#   r   nullmax_affected_itemszMax Affected Itemsz]Set this to prevent the discount consuming all items within the range that are in the basket.)r   r#   	help_textr+   proxy_classzCustom classN   )uniquer   defaultr"   Benefits)verbose_name_pluralr   )namefieldsoptionsbases	ConditionCount@Depends on number of items in basket that are in condition range?Depends on value of items in basket that are in condition rangeCoverageHNeeds to contain a set number of DISTINCT items from the condition range
ConditionsConditionalOfferr4   Namez.This is displayed within the customer's basket)r   r0   r"   r-   slugSlug)populate_fromr0   r   r"   editabler#   descriptionDescriptionz,This is displayed on the offer browsing page)r   r-   r#   
offer_typeSite#Site offer - available to all usersVoucherJVoucher offer - only available after entering the appropriate voucher codeUser/User offer - available to certain types of userSessionWSession offer - temporary offer, available for a user for the duration of their session)r1   r"   r   r$   statusOpen@   Status)r1   r"   r   priorityr   Priorityz-The highest priority offers are applied first)r1   r   r-   start_datetimez
Start date)r#   r   r+   end_datetimezEnd datez1Offers are active until the end of the 'end date'max_global_applicationszMax global applicationszCThe number of times this offer can be used before it is unavailablemax_user_applicationszMax user applicationsz4The number of times a single user can use this offermax_basket_applicationszMax basket applicationszEThe number of times this offer can be applied to a basket (and order)max_discountzMax discountzgWhen an offer has given more discount to orders than this threshold, then the offer becomes unavailable)r   r)   r*   r+   r-   r#   total_discountz0.00zTotal Discount)r1   r)   r*   r   num_applicationszNumber of applications)r1   r   
num_orderszNumber of Ordersredirect_urlzURL redirect (optional))r   r#   date_createdzDate Created)auto_now_addr   benefitzoffer.Benefit)r   to	on_delete	conditionzoffer.Conditionz	-priorityzConditional offerszConditional offer)orderingr3   r   Range)r0   r"   r   )r#   	is_publicz
Is public?z)Public ranges have a customer-facing pageincludes_all_productszIncludes all products?classeszProduct Typeszcatalogue.ProductClass)related_namer   rc   r#   excluded_productsexcludeszExcluded Productszcatalogue.Productincluded_categoriesincludeszIncluded Categorieszcatalogue.CategoryRangesRangeProductdisplay_order)r1   product)rc   rd   rangezoffer.RangeRangeProductFileUploadfilepathz	File Path)r"   r   sizeSize)r   date_uploadedzDate UploadedPending    Failed	Processederror_messagezError Message)r"   r   r#   date_processedzDate Processed)r   r+   num_new_skuszNumber of New SKUsnum_unknown_skuszNumber of Unknown SKUsnum_duplicate_skuszNumber of Duplicate SKUsfile_uploads)r   rk   rc   rd   uploaded_byzUploaded By-date_uploadedzRange Product Uploaded FileszRange Product Uploaded FileZrangeproduct)r4   unique_togetherincluded_productszIncluded Productszoffer.RangeProduct)rk   r   rc   throughr#   )
model_namer4   fieldpreserve_default)r+   r   rc   r#   rd   AbsoluteDiscountBenefitzAbsolute discount benefitszAbsolute discount benefit)r3   r   proxyoffer.benefitCountConditionzCount conditionszCount conditionoffer.conditionCoverageConditionzCoverage ConditionszCoverage ConditionFixedPriceBenefitzFixed price benefitszFixed price benefitMultibuyDiscountBenefitzMultibuy discount benefitszMultibuy discount benefitPercentageDiscountBenefitzPercentage discount benefitszPercentage discount benefitShippingBenefitr   ShippingAbsoluteDiscountBenefitz#Shipping absolute discount benefitsz"Shipping absolute discount benefitoffer.shippingbenefitShippingFixedPriceBenefitzFixed price shipping benefitszFixed price shipping benefit!ShippingPercentageDiscountBenefitz%Shipping percentage discount benefitsz$Shipping percentage discount benefitValueConditionzValue conditionszValue condition)r   r	   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r    r!   )r9   r:   )r(   r;   )r<   r=   )rH   rI   )rJ   rK   )rL   rM   )rN   rO   )rz   rz   )r|   r|   )r}   r}   )r   )rt   rs   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )r   )"__name__
__module____qualname__r   swappable_dependencyr   AUTH_USER_MODELdependenciesCreateModelr   	AutoField	CharFieldoscarr5   PositiveDecimalFieldPositiveIntegerFieldNullCharFieldModelautoslugfieldAutoSlugField	TextFieldIntegerFieldDateTimeFieldDecimalFieldr   ExtendedURLField
ForeignKeyCASCADEBooleanFieldManyToManyFieldAlterUniqueTogethersetAddField
operations r   r   =/var/www/html/oscar2019/apps/offer/migrations/0001_initial.pyr      sl  "





r   )
__future__r   	django.dbr   r   !oscar.models.fields.autoslugfieldr   decimalr   oscar.models.fieldsdjango.confr   r   r   r   r   r   <module>   s   