Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 3.57 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from zope import schema
  2. from zope.interface import Interface
  3.  
  4. from zope.app.container.constraints import contains
  5. from zope.app.container.constraints import containers
  6.  
  7. from buzz.coupon import couponMessageFactory as _
  8.  
  9. class ICoupon(Interface):
  10.     """Online Coupon"""
  11.    
  12.     # -*- schema definition goes here -*-
  13.     io_num = schema.TextLine(
  14.         title=_(u"Insertion Order"),
  15.         required=True,
  16.         description=_(u"Insertion order number (for tracking)"),
  17.     )
  18.  
  19.     printmax = schema.Int(
  20.         title=_(u"Print Max"),
  21.         required=False,
  22.         description=_(u"Maximum times that this coupon may be printed"),
  23.     )
  24.  
  25.     printcount = schema.Int(
  26.         title=_(u"Print Count"),
  27.         required=False,
  28.         description=_(u"The number of times this coupon has been printed"),
  29.     )
  30.  
  31.     alllocations = schema.Bool(
  32.         title=_(u"All Locations"),
  33.         required=False,
  34.         description=_(u"Will this coupon be available at all locations? (other location fields will be ignored)"),
  35.     )
  36.  
  37.     criteria = schema.List(
  38.         title=_(u"Criteria"),
  39.         required=False,
  40.         description=_(u"Choose the selction critera types for this coupon to be displayed"),
  41.     )
  42.  
  43.     clusters = schema.List(
  44.         title=_(u"Clusters"),
  45.         required=False,
  46.         description=_(u"Clusters that this coupon will be available at"),
  47.     )
  48.  
  49.     locations = schema.List(
  50.         title=_(u"Locations"),
  51.         required=False,
  52.         description=_(u"Locations that this coupon is valid at"),
  53.     )
  54.  
  55.     bc_image = schema.Bytes(
  56.         title=_(u"Barcode"),
  57.         required=False,
  58.         description=_(u"Barcode image for printing"),
  59.     )
  60.  
  61.     bc_num = schema.TextLine(
  62.         title=_(u"Barcode Number"),
  63.         required=False,
  64.         description=_(u"Numeric barcode value"),
  65.     )
  66.  
  67.     scr_hmr = schema.Int(
  68.         title=_(u"Store Classes/Ranks - HMR"),
  69.         required=False,
  70.         description=_(u"The store class/rank minimum for this coupon to show"),
  71.     )
  72.  
  73.     scr_chilled = schema.Int(
  74.         title=_(u"Store Classes/Ranks - Chilled"),
  75.         required=False,
  76.         description=_(u"The store class/rank minimum for this coupon to show"),
  77.     )
  78.  
  79.     scr_frozen = schema.Int(
  80.         title=_(u"Store Classes/Ranks - Frozen"),
  81.         required=False,
  82.         description=_(u"The store class/rank minimum for this coupon to show"),
  83.     )
  84.  
  85.     scr_dry = schema.Int(
  86.         title=_(u"Store Classes/Ranks - Dry"),
  87.         required=False,
  88.         description=_(u"The store class/rank minimum for this coupon to show"),
  89.     )
  90.  
  91.     brand_image = schema.Bytes(
  92.         title=_(u"Brand"),
  93.         required=False,
  94.         description=_(u"Image or logo of the brand"),
  95.     )
  96.  
  97.     manufacturer = schema.TextLine(
  98.         title=_(u"Manufacturer"),
  99.         required=False,
  100.         description=_(u"Field description"),
  101.     )
  102.  
  103.     printimage = schema.Bytes(
  104.         title=_(u"Print Image"),
  105.         required=False,
  106.         description=_(u"Image to be printed as the store coupon"),
  107.     )
  108.  
  109.     webimage = schema.Bytes(
  110.         title=_(u"Web Image"),
  111.         required=False,
  112.         description=_(u"Image for display on the web"),
  113.     )
  114.  
  115.     restrictions = schema.Text(
  116.         title=_(u"Restrictions"),
  117.         required=False,
  118.         description=_(u"Restrictions on usage of this coupon (i.e. One per customer)"),
  119.     )
  120.  
  121.     costvalue = schema.TextLine(
  122.         title=_(u"Value"),
  123.         required=False,
  124.         description=_(u"Coupon value (i.e. 50% Off or $1.00 Off)"),
  125.     )