Sso\WebserviceBundle\Entity\Webservice\Type\User:
    type: entity
    table: user
    indexes:
        idx_id:
            columns:
                - user_id
                - user_isactive
        idx_firstname:
            columns:
                - user_firstname
        idx_lastname:
            columns:
                - user_lastname
        idx_passwordtoken:
            columns:
                - user_passwordtoken
    uniqueConstraints:
        udx_guid:
            columns:
                - user_guid
        udx_email:
            columns:
                - user_loweremail
        udx_username:
            columns:
                - user_lowerusername
    id:
        Id:
            type: string
            nullable: false
            length: 64
            fixed: true
            id: true
            column: user_id
            generator:
                strategy: NONE
    fields:
        Guid:
            type: string
            nullable: false
            length: 64
            fixed: false
            column: user_guid
        Email:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: user_email
        LowerEmail:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: user_loweremail
        Username:
            type: string
            nullable: false
            length: 127
            fixed: false
            column: user_username
        LowerUsername:
            type: string
            nullable: false
            length: 127
            fixed: false
            column: user_lowerusername
        Password:
            type: string
            nullable: false
            length: 255
            fixed: false
            column: user_password
        Firstname:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: user_firstname
        Lastname:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: user_lastname
        Active:
            type: boolean
            nullable: false
            default: '0'
            column: user_isactive
        PasswordToken:
            type: string
            nullable: true
            length: 64
            fixed: true
            column: user_passwordtoken
        PasswordTokenExpire:
            type: datetime
            nullable: true
            column: user_passwordtokenexpire
        resetPasswordToken:
            type: string
            nullable: true
            length: 64
            fixed: true
            column: user_reset_password_token
        resetPasswordTokenExpire:
            type: datetime
            nullable: true
            column: user_reset_password_token_expire
        ActivateToken:
            type: string
            nullable: true
            length: 64
            fixed: true
            column: user_activatetoken
        ActivateTokenExpire:
            type: datetime
            nullable: true
            column: user_activatetokenexpire
        AuthId:
            type: string
            nullable: true
            length: 64
            fixed: false
            column: user_auth_id
        LdapSearchAttributes:
            type: string
            nullable: true
            length: 255
            fixed: false
            column: user_ldap_search_attributes
        LdapSearchValue:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: user_ldap_search_value
        Deleted:
            type: boolean
            nullable: false
            default: '0'
            column: user_deleted
        DeletedAt:
            type: datetime
            nullable: true
            column: user_deleted_at
        CreatedAt:
            type: datetime
            nullable: true
            column: user_created_at
        UpdatedAt:
            type: datetime
            nullable: true
            column: user_updated_at
        UpdatedReferencesAt:
            type: datetime
            nullable: true
            column: user_updated_references_at
        LastLoginAt:
            type: datetime
            nullable: true
            column: user_last_login_at
        LoginFails:
            type: integer
            nullable: true
            column: user_login_fails
        MfaEnabled:
            type: boolean
            nullable: true
            column: mfa_enabled
        MfaSecret:
            type: string
            nullable: true
            length: 255
            column: mfa_secret
        MfaSecretReceived:
            type: boolean
            nullable: true
            column: mfa_secret_received
        MfaCreatedAt:
            type: datetime
            nullable: true
            column: mfa_created_at
        MfaUpdatedAt:
            type: datetime
            nullable: true
            column: mfa_updated_at
        loginFailedFirstAt:
            type: datetime
            nullable: true
            column: login_failed_first_at
        loginFailedLastAt:
            type: datetime
            nullable: true
            column: login_failed_last_at
        passwordPolicy:
            type: string
            nullable: true
            length: 127
            fixed: false
            column: password_policy
        lastPasswordChange:
            type: datetime
            nullable: true
            column: last_pwd_change
        passwordExpired:
            type: boolean
            nullable: true
            column: password_expired
        passwordEncryptType:
            type: string
            nullable: false
            length: 127
            fixed: false
            column: password_encrypt_type
    oneToMany:
        UserApplications:
            targetEntity: UserApplication
            mappedBy: User
            joinColumn:
    manyToMany:
        userGroups:
            targetEntity: UserGroup
            joinTable:
                name: user_to_group
                joinColumns:
                    user_id:
                        referencedColumnName: user_id
                        onDelete: 'CASCADE'
                inverseJoinColumns:
                    user_group_id:
                        referencedColumnName: user_group_id
                        onDelete: 'CASCADE'
    lifecycleCallbacks:
        preUpdate: [ onPreUpdate ]
