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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#schema.yml
SaphirImage:
columns:
url: { type: string(100), notnull: true }
SaphirUser:
actAs: { Timestampable: ~ }
columns:
nom: { type: string(45), notnull: true }
prenom: { type: string(45), notnull: true }
pseudo: { type: string(45), notnull: true }
password: { type: string(45), notnull: true }
email: { type: string(45), notnull: true }
naissance: { type: date(25), notnull: true }
pays: { type: string(20), notnull: true }
SaphirEquipe:
columns:
plateforme: {type: varchar(20) }
jeu: {type: varchar(20) }
SaphirJoueur:
columns:
chef: { type: boolean, notnull: true }
SaphirUser_id: { type: integer }
SaphirEquipe_id: { type: integer }
SaphirImage_id : { type: integer }
relations:
SaphirUser: { foreignType: one, onDelete : CASCADE, local: saphirUser_id, foreign: id, foreignAlias: SaphirJoue }
SaphirEquipe: { local: saphirEquipe_id, foreign: id, foreignAlias: SaphirMembre }
SaphirImage: { foreignType: one, local: saphirImage_id, foreign: id, foreignAlias: SaphirAvatar }
SaphirNews:
actAs: { Timestampable: ~ }
columns:
titre: { type: string(100), notnull: true }
texte: { type: string(), notnull: true }
saphirImage_id: { type: integer }
saphirUser_id: { type: integer }
relations:
SaphirImage: { foreignType: one, local: saphirImage_id, foreign: id, foreignAlias: SaphirImageNews }
SaphirUser: { local: saphirUser_id, foreign: id, foreignAlias: SaphirAuteurNews }
SaphirCommentaire:
actAs: { Timestampable: ~ }
columns:
texte: { type: string(), notnull: true }
saphirNews_id: { type: integer }
saphirUser_id: {type: integer }
relations:
SaphirNews: { onDelete: CASCADE, local: saphirNews_id, foreign: id, foreignAlias: SaphirCommentaires }
SaphirUser: { local: saphirUser_id, foreign: id, foreignAlias: saphirAuteurCommentaire } |