B
    `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deejgZejdde	j
dddddfde	jd	d
ddddddddg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d%d&d'g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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
d,d-fd.ej	jjjd*dd/d
ddd0fd1e	jd2d3dd4fd5e	jd6d
d	d7d8d9d:gd;fd<e	jd=d>d?d@fdAe	jdBdCdDdEfdFe	jddGddHfdIe	jdJddKddfdLe	jdMddNddfdOe	jdPddQddfdRe	jdSddTddfdUe	jdVddddWddXfdYe	jedZddd[d\fd]e	jdBd^d_fd`e	jdBdad_fdbej	jjdcdddfdee	jddfdgfdhe	jddie	jdjfdke	jd$dle	jdjfgdmgdndodpe	jfd#ejdqde	j
dddddfd*e	jdd
d+drfd.ej	jjjd*dd/d
ddd0fd1e	jddsfdte	jddudvdEfdwe	jddxd_fdej	jjddddd fdee	jddfdgfdye	jdydzd{dd|fd}e	jd~dddd|fde	jddddd|fgddqd"e	jfd#ejdde	j
dddddfde	jdBd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ddgfd<e	jddd?dddgd;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dqdde	jdfde	jdeje	jdjfgddddpe	jfd#ejdedgdej dde	jddddddddej dkde	jddqdde	jdddej dhde	jddqdd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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#gZ!dS )	Migration)Z	catalogueZ0001_initialZBenefitidTFZID)Zauto_createdZprimary_key	serializeverbose_nametypeType   )Z
Percentagez3Discount is a percentage off of the product's value)ZAbsolutez5Discount is a fixed amount off of the product's value)ZMultibuyz1Discount is to give the cheapest product for free)zFixed pricez:Get the products that meet the condition for a fixed price)zShipping absolutez/Discount is a fixed amount of the shipping cost)zShipping fixed pricezGet shipping for a fixed price)zShipping percentagez1Discount is a percentage off of the shipping cost)r
   
max_lengthblankchoicesvalue      Value)
max_digitsdecimal_placesr   r
   nullZ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   Zproxy_classzCustom classN   )uniquer
   defaultr   ZBenefits)verbose_name_pluralr
   )namefieldsoptionsbases	Condition)ZCountz@Depends on number of items in basket that are in condition range)r   z?Depends on value of items in basket that are in condition range)ZCoveragezHNeeds to contain a set number of DISTINCT items from the condition rangeZ
ConditionsZConditionalOfferr   Namez.This is displayed within the customer's basket)r
   r   r   r   ZslugZSlug)Zpopulate_fromr   r
   r   editabler   descriptionDescriptionz,This is displayed on the offer browsing page)r
   r   r   Z
offer_typeSite)r&   z#Site offer - available to all users)ZVoucherzJVoucher offer - only available after entering the appropriate voucher code)ZUserz/User offer - available to certain types of user)SessionzWSession offer - temporary offer, available for a user for the duration of their session)r   r   r
   r   statusZOpen@   ZStatus)r   r   r
   priorityr   ZPriorityz-The highest priority offers are applied first)r   r
   r   Zstart_datetimez
Start date)r   r
   r   Zend_datetimezEnd datez1Offers are active until the end of the 'end date'Zmax_global_applicationszMax global applicationszCThe number of times this offer can be used before it is unavailableZmax_user_applicationszMax user applicationsz4The number of times a single user can use this offerZmax_basket_applicationszMax basket applicationszEThe number of times this offer can be applied to a basket (and order)Z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   Ztotal_discountz0.00zTotal Discount)r   r   r   r
   Znum_applicationszNumber of applications)r   r
   Z
num_orderszNumber of OrdersZredirect_urlzURL redirect (optional))r
   r   Zdate_createdzDate Created)Zauto_now_addr
   Zbenefitzoffer.Benefit)r
   to	on_delete	conditionzoffer.Conditionz	-priorityzConditional offerszConditional offer)Zorderingr   r
   ZRange)r   r   r
   )r   Z	is_publicz
Is public?z)Public ranges have a customer-facing pageZincludes_all_productszIncludes all products?classeszProduct Typeszcatalogue.ProductClass)related_namer
   r+   r   Zexcluded_productsZexcludeszExcluded Productszcatalogue.ProductZincluded_categoriesZincludeszIncluded Categorieszcatalogue.CategoryZRangesZRangeProductZdisplay_order)r   product)r+   r,   rangezoffer.RangeZRangeProductFileUploadfilepathz	File Path)r   r
   sizeSize)r
   Zdate_uploadedzDate UploadedPending    )r5   r5   )Failedr7   )	Processedr8   error_messagezError Message)r   r
   r   Zdate_processedzDate Processed)r
   r   Znum_new_skuszNumber of New SKUsZnum_unknown_skuszNumber of Unknown SKUsZnum_duplicate_skuszNumber of Duplicate SKUsZfile_uploads)r
   r/   r+   r,   Zuploaded_byzUploaded By)z-date_uploadedzRange Product Uploaded FileszRange Product Uploaded FileZrangeproduct)r1   r0   )r   Zunique_togetherZincluded_productszIncluded Productszoffer.RangeProduct)r/   r
   r+   Zthroughr   )Z
model_namer   fieldZpreserve_default)r   r
   r+   r   r,   ZAbsoluteDiscountBenefitzAbsolute discount benefitszAbsolute discount benefit)r   r
   proxy)zoffer.benefitZCountConditionzCount conditionszCount condition)zoffer.conditionZCoverageConditionzCoverage ConditionszCoverage ConditionZFixedPriceBenefitzFixed price benefitszFixed price benefitZMultibuyDiscountBenefitzMultibuy discount benefitszMultibuy discount benefitZPercentageDiscountBenefitzPercentage discount benefitszPercentage discount benefitZShippingBenefitr;   ZShippingAbsoluteDiscountBenefitz#Shipping absolute discount benefitsz"Shipping absolute discount benefit)zoffer.shippingbenefitZShippingFixedPriceBenefitzFixed price shipping benefitszFixed price shipping benefitZ!ShippingPercentageDiscountBenefitz%Shipping percentage discount benefitsz$Shipping percentage discount benefitZValueConditionzValue conditionszValue condition)"__name__
__module____qualname__r   Zswappable_dependencyr   ZAUTH_USER_MODELZdependenciesZCreateModelr   Z	AutoFieldZ	CharFieldoscarr   ZPositiveDecimalFieldZPositiveIntegerFieldZNullCharFieldZModelZautoslugfieldZAutoSlugFieldZ	TextFieldZIntegerFieldZDateTimeFieldZDecimalFieldr   ZExtendedURLFieldZ
ForeignKeyZCASCADEZBooleanFieldZManyToManyFieldZAlterUniqueTogethersetZAddField
operations rB   rB   W/home/dcms/DCMS/lib/python3.7/site-packages/oscar/apps/offer/migrations/0001_initial.pyr      sl  "





r   )
__future__r   Z	django.dbr   r   Z!oscar.models.fields.autoslugfieldr?   decimalr   Zoscar.models.fieldsZdjango.confr   r   rB   rB   rB   rC   <module>   s   