Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ProductCategory:
- options:
- actAs: [Timestampable]
- columns:
- product_id: { type: integer, primary: true }
- category_id: { type: integer, primary: true }
- relations:
- Product: { class: Product, local: product_id, foreign: id, onDelete: CASCADE }
- Category: { class: Category, local: category_id, foreign: id, onDelete: CASCADE }
- Category:
- tableName: category
- actAs: { Timestampable: ~ }
- columns:
- name: { type: string(80), notnull: true }
- url: { type: string(100) }
- parent_id: { type: bigint }
- description: { type: string(255)}
- active: { type: boolean }
- sortorder: { type:integer }
- relations:
- Categories: { class: Category, local: id, foreign: parent_id }
- Product:
- tableName: product
- actAs: { Timestampable: ~ }
- columns:
- name: { type: string(100), notnull: true }
- code: { type: string(100) }
- description: { type: string(4000) }
- description2: { type: string(4000) }
- quantity_ca: { type: integer, default: 0, notnull: true }
- quantity_us: { type: integer, default: 0, notnull: true }
- price_ca: { type: double, notnull: true }
- price_us: { type: double, notnull: true }
- freight_ind: { type: boolean }
- weight: { type: double }
- active: { type: boolean }
- sortorder: { type: integer }
- photo_path: { type: string(400) }
- relations:
- Categories: { class: Category, local: product_id, foreign: category_id, refClass: ProductCategory, foreignAlias: Products }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement