Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. ProductCategory:
  2. options:
  3. actAs: [Timestampable]
  4. columns:
  5. product_id: { type: integer, primary: true }
  6. category_id: { type: integer, primary: true }
  7. relations:
  8. Product: { class: Product, local: product_id, foreign: id, onDelete: CASCADE }
  9. Category: { class: Category, local: category_id, foreign: id, onDelete: CASCADE }
  10.  
  11. Category:
  12. tableName: category
  13. actAs: { Timestampable: ~ }
  14. columns:
  15. name: { type: string(80), notnull: true }
  16. url: { type: string(100) }
  17. parent_id: { type: bigint }
  18. description: { type: string(255)}
  19. active: { type: boolean }
  20. sortorder: { type:integer }
  21. relations:
  22. Categories: { class: Category, local: id, foreign: parent_id }
  23.  
  24. Product:
  25. tableName: product
  26. actAs: { Timestampable: ~ }
  27. columns:
  28. name: { type: string(100), notnull: true }
  29. code: { type: string(100) }
  30. description: { type: string(4000) }
  31. description2: { type: string(4000) }
  32. quantity_ca: { type: integer, default: 0, notnull: true }
  33. quantity_us: { type: integer, default: 0, notnull: true }
  34. price_ca: { type: double, notnull: true }
  35. price_us: { type: double, notnull: true }
  36. freight_ind: { type: boolean }
  37. weight: { type: double }
  38. active: { type: boolean }
  39. sortorder: { type: integer }
  40. photo_path: { type: string(400) }
  41. relations:
  42. Categories: { class: Category, local: product_id, foreign: category_id, refClass: ProductCategory, foreignAlias: Products }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement