db.define_table('clsb_product',
Field('product_category', type = 'reference clsb_category', notnull = True,
label = T('Category')),
Field('product_type', type = 'reference clsb_product_type', notnull = True,
label = T('Product Type')),
Field('product_relation', type = 'reference clsb_relation', notnull = True,
label = T('Product Relation')),
Field('product_creator', type = 'reference clsb_dic_creator', notnull = True,
label = T('Product Creator')),
Field('product_publisher', type = 'reference clsb_dic_publisher', notnull = True,
label = T('Product Publisher')),
Field('product_title', type = 'string', notnull = True,
label = T('Product Title')),
Field('product_code', type = 'string', notnull = True, unique = True,
label = T('Product Code')),
Field('total_file', type = 'integer',
label = T('Total File')),
Field('product_cover', type = 'upload', requires = IS_IMAGE(extensions = 'png'), notnull = True,
label = T('Cover Image')),
Field('product_data', type = 'upload', requires = IS_UPLOAD_FILENAME(extension = 'zip'), notnull = True,
label = T('Product Data')),
auth.signature,
format = '%(product_title)s')