Skip to content

Instantly share code, notes, and snippets.

@taion809
Created January 18, 2015 16:54
Show Gist options
  • Save taion809/02d23dffa3e0b48bb3df to your computer and use it in GitHub Desktop.
Save taion809/02d23dffa3e0b48bb3df to your computer and use it in GitHub Desktop.
FOSUserBundle User Mapping (YAML)
# src/AppBundle/Resources/config/doctrine/User.orm.yml
AppBundle\Entity\User:
type: entity
table: users
id:
id:
type: integer
generator:
strategy: AUTO
fields:
username:
type: string
length: 255
column: username
usernameCanonical:
type: string
length: 255
column: username_canonical
unique: true
email:
type: string
length: 255
column: email
emailCanonical:
type: string
length: 255
column: email_canonical
unique: true
enabled:
type: boolean
column: enabled
salt:
type: string
column: salt
password:
type: string
column: password
lastLogin:
type: datetime
nullable: true
column: last_login
locked:
type: boolean
column: locked
expired:
type: boolean
column: expired
expiresAt:
type: datetime
column: expires_at
nullable: true
confirmationToken:
type: string
column: confirmation_token
nullable: true
passwordRequestedAt:
type: datetime
column: password_requested_at
nullable: true
roles:
type: array
column: roles
credentialsExpired:
type: boolean
column: credentials_expired
credentialsExpireAt:
type: datetime
column: credentials_expire_at
nullable: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment