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 49 50 51 52 53 54 55 56 57 58 59
| # config/doctrine/schema.yml
Annonce:
actAs: { Timestampable: ~ }
columns:
Utilisateur_id: { type: integer, notnull: true }
Categorie_id: { type: integer, notnull: true }
Region_id: { type: integer, notnull: true }
Departement_id: { type: integer, notnull: true }
CodePostal: { type: integer }
Ville: { type: string(255) }
TexteAnnonce: { type: string(4000) }
TitreAnnonce: { type: string(255) }
Prix: { type: integer}
TypeAnnonce: { type: string(255)}
isAccomplished: { type: boolean, notnull: true, default: 0 }
is_activated: { type: boolean, notnull: true, default: 0 }
expires_at: { type: timestamp, notnull: true }
relations:
Utilisateur: { onDelete: CASCADE, local: Utilisateur_id, foreign: id, foreignAlias: Utilisateur }
Categorie: { onDelete: CASCADE, local: Categorie_id, foreign: id }
Region: { onDelete: CASCADE, local: Region_id, foreign: id }
Departement: { onDelete: CASCADE, local: Departement_id, foreign: id }
Region:
actAs:
Sluggable:
unique: true
fields: [nom]
columns:
nom: { type: string(255), notnull: true, unique: true }
Departement:
columns:
Region_id: { type: integer, notnull: true }
nom: { type: string(255), notnull: true }
relations:
Region: { onDelete: CASCADE, local: Region_id, foreign: id }
Categorie:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
famille: { type: string(255), notnull: true, unique: true }
Valeurs:
actAs: { Timestampable: ~ }
columns:
Annonce_id: { type: integer, notnull: true }
TypeParticulier_id: { type: integer, notnull: true }
nom: { type: string(255), notnull: true, unique: true }
relations:
Annonce: { onDelete: CASCADE, local: Annonce_id, foreign: id }
TypeParticulier: { onDelete: CASCADE, local: TypeParticulier_id, foreign: id }
Photo:
actAs: { Timestampable: ~ }
columns:
Annonce_id: { type: integer, notnull: true }
filename: { type: string(255) }
caption: { type: string(255), notnull: true }
relations:
Annonce: {alias:Annonce,foreignType: many,foreignAlias: Photos, onDelete: CASCADE } |
Partager