1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
User:
actAs:
Timestampable: ~
columns:
pseudo: { type: string(12), unique: true }
mdp: { type: string(20), notnull: true }
[ ... ]
relations:
Objet: { refClass: Achete, local: user_id, foreign: objet_id }
Objet:
actAs:
Timestampable: ~
columns:
titre_objet: { type: string(50), notnull: true }
description: { type: clob }
[ ... ]
vendeur_id: { type: integer, notnull: true }
gagnant_id: { type: integer }
relations:
User: { onDelete: CASCADE, local: vendeur_id, foreign: id }
User: { onDelete: CASCADE, local: gagnant_id, foreign: id }
User: { refClass: Achete, local: objet_id, foreign: user_id }
Achete:
actAs: { Timestampable: ~ }
columns:
user_id: { type: integer, primary: true }
objet_id: { type: integer, primary: true }
prix: { type: integer(11), notnull: true } |
Partager