PhpRiot
Follow phpriot on Twitter
Sponsored Link

Listing 2713

Submitted by anonymous user, 1 March 2010
# config/doctrine/schema.yml
User:
   actAs: { Timestampable: ~ } 
   columns:
      
      face_id:     { type: integer, notnull: true }
      firstname:   { type: string(255), notnull: true }
      lastname:    { type: string(255), notnull: true }
      username:    { type: string(255), unique: true, notnull: true }
      about:       { type: string(4000), notnull: true }
      password:    { type: string(255), notnull: true }
      email:       { type: string(255), unique: true, notnull: true }
      status_id:   { type: integer, notnull: true } 
      register_at: { type: timestamp, notnull: true }
   relations:
      Status: { local: status_id, foreign: id, foreignAlias: Status }
      Face:   { onDelete: CASCADE, local: face_id, foreign: id, foreignAlias: Face }
      Vote: { onDelete: CASCADE,local: id, foreign: user_id, foreignAlias: Vote }
     

Face:
   columns:
     category_id:  { type: integer, notnull: true }
     name:         { type: string(255), notnull: true }
     content:      { type: string(255) }
     description:  { type: string(4000)}
     user_id:      { type: integer, notnull: true }
     link:         { type: string(255), notnull: true }
     small_link:   { type: string(255), notnull: true }
     comments_on:  { type: integer, notnull: true, default: 1 }
     vote_on:      { type: boolean, notnull: true, default: 1 }
     vote_count:   { type: boolean, notnull: true, default: 0 }
   relations:
     User: { local: user_id, foreign: id, foreignAlias: User }
     Comment: { onDelete: CASCADE, local: id, foreign: face_id, foreignAlias: Comment }
     Vote: { local: id, foreign: face_id, foreignAlias: Vote }
Status:
   columns: 
     name:       { type: string(255), notnull: true, unique: true }

Category:
   columns: 
     name:       { type: string(255), notnull: true, unique: true }
   relations:
     Face: { onDelete: CASCADE, local: id, foreign: category_id; foreignAlias: Face }

Friends:
   columns:
     one_id:    { type: integer, notnull: true }
     two_id:    { type: integer, notnull: true }
   relations:
     Friend1: { local: one_id, foreign: id, foreignAlias: User }
     Friend2: { local: two_id, foreign: id, foreignAlias: User }

Vote:
   columns:  
     user_id:      { type: integer, notnull: true }
     face_id:      { type: integer, notnull: true }
     vote :        { type: integer, notnull: true }

Message:
   columns:
     to_id:       { type: integer, notnull: true }
     from_id:     { type: integer, notnull: true }
     subject:     { type: string(255), notnull: true }
     content:     { type: string(4000)}
   relations:
     UserTo: { local: to_id, foreign: id, foreignAlias: User }
     UserFrom: { local: from_id, foreign: id, foreignAlias: User }
Submit a Follow Up