MMv4 KB
 
product_royalty DB Table
  Last Edited - 07/1/2009 3:32pm PDT
  Category Path - Developer's Guide > Database Structure
 

This article outlines the database structure for the MMv4 product_royalty database table.

  • id
    Primary Key of the table.
    int(10) | unsigned | auto increment | primary key | indexed
  • pid
    A reference to the product.id field.
    int(10) | unsigned | indexed
  • vid
    A reference to the vendor.id field. If the value of this field is zero, then this royalty rule will be applied to every vendor associated with this product.
    int(10) | unsigned | indexed
  • value
    The numeric value of the royalty earned by the vendor for each unit of the product sold.
    double(16,2)
  • type
    Determines whether the value field is a dollar value or percentage of the product's purchase price.
    char(1) | Values: D,P | Default: D
  • use_cogs_in_royalty
    If set to a value greater than zero, then
    the product.cogs value is first subtracted from the product's purchase price when the royalty (if any) is calculated.
    int(10) | unsigned | Values: 0/timestamp | Default: 0
Powered by ModularKB