Skip to content

Instantly share code, notes, and snippets.

@richardudovich
Created June 30, 2014 07:42
Show Gist options
  • Save richardudovich/9c83eb20f83929bde881 to your computer and use it in GitHub Desktop.
Save richardudovich/9c83eb20f83929bde881 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="AFD\SMSBundle\Entity\Client\User" repository-class="AFD\SMSBundle\Entity\Client\UserRepository" table="client_user">
<id name="id" type="integer" column="id">
<generator strategy="AUTO" />
</id>
<field name="username" column="username" type="string" length="255" />
<field name="firstname" column="firstname" type="string" length="255" nullable="true"/>
<field name="lastname" column="lastname" type="string" length="255" nullable="true"/>
<field name="phone" column="phone" type="string" length="255" nullable="true"/>
<field name="facebookUid" column="facebookUid" type="string" length="255" nullable="true"/>
<field name="facebookName" column="facebookName" type="string" length="255" nullable="true"/>
<field name="twitterUid" column="twitterUid" type="string" length="255" nullable="true"/>
<field name="twitterName" column="twitterName" type="string" length="255" nullable="true"/>
<field name="gplusUid" column="gplusUid" type="string" length="255" nullable="true"/>
<field name="gplusName" column="gplusName" type="string" length="255" nullable="true"/>
<field name="token" column="token" type="string" length="255" nullable="true"/>
<field name="twoStepVerificationCode" column="twoStepVerificationCode" type="string" length="255" nullable="true"/>
<field name="usernameCanonical" column="username_canonical" type="string" length="255" unique="true" />
<field name="email" column="email" type="string" length="255" />
<field name="emailCanonical" column="email_canonical" type="string" length="255" unique="true" />
<field name="enabled" column="enabled" type="boolean" />
<field name="salt" column="salt" type="string" />
<field name="password" column="password" type="string" />
<field name="lastLogin" column="last_login" type="datetime" nullable="true" />
<field name="locked" column="locked" type="boolean" />
<field name="expired" column="expired" type="boolean" />
<field name="expiresAt" column="expires_at" type="datetime" nullable="true" />
<field name="confirmationToken" column="confirmation_token" type="string" nullable="true" />
<field name="passwordRequestedAt" column="password_requested_at" type="datetime" nullable="true" />
<field name="credentialsExpired" column="credentials_expired" type="boolean" />
<field name="credentialsExpireAt" column="credentials_expire_at" type="datetime" nullable="true" />
<many-to-many field="roles" target-entity="AFD\SMSBundle\Entity\Client\Role" inversed-by="users">
<join-table name="client_user_role">
<join-columns>
<join-column id="user_id" name="user_id" referenced-column-name="id" />
</join-columns>
<inverse-join-columns>
<join-column id="role_id" name="role_id" referenced-column-name="id" />
</inverse-join-columns>
</join-table>
</many-to-many>
<many-to-many field="groups" target-entity="AFD\SMSBundle\Entity\Client\Group" inversed-by="users">
<join-table name="client_user_group">
<join-columns>
<join-column id="user_id" name="user_id" referenced-column-name="id" />
</join-columns>
<inverse-join-columns>
<join-column id="group_id" name="group_id" referenced-column-name="id" />
</inverse-join-columns>
</join-table>
</many-to-many>
</entity>
</doctrine-mapping>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment