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
|
# config/doctrine/schema.yml
Region:
tableName: region
columns:
id: { type: integer(4), unsigned: true, primary: true, autoincrement: true }
name: { type: string(255), notnull: true }
Departement:
tableName: departement
columns:
region_id: { type: integer(4), unsigned: true }
name: { type: string(255), notnull: true }
relations:
Region:
local: region_id
foreign: id
foreignAlias: Departement
onDelete: CASCADE
Annonce:
actAs: { Timestampable: ~ }
columns:
Utilisateur_id: { type: integer, notnull: true }
Categorie_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 }
Departement: { onDelete: CASCADE, local: Departement_id, foreign: id}
Categorie: { onDelete: CASCADE, local: Categorie_id, foreign: id }
Categorie:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
famille: { type: string(255), notnull: true, unique: true }
.
.
. |
Partager