/**
 * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gravitee.repositories.mongodb.internal.model;

import java.util.Objects;

import org.springframework.data.mongodb.core.mapping.Document;

/**
 * Mongo objet model for user
 * 
 * @author Loic DASSONVILLE (loic.dassonville at gmail.com)
 */
@Document(collection="users")
public class UserMongo extends AbstractUserMongo {

    private String email;

	
    public String getEmail() {
        return email;
    }

    public void setEmail(String mail) {
        this.email = mail;
    }


	@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserMongo user = (UserMongo) o;
        return Objects.equals(name, user.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("User{");
        sb.append(" email='").append(email).append(",\'");
        sb.append(" username='").append(name).append("\'");
        sb.append('}');
        return sb.toString();
    }
}

@@ -682,16 +682,39 @@
 model;%0A%0A
+import java.util.Date;%0A
 import j
@@ -1006,16 +1006,71 @@
  email;%0A
+    private Date createdAt;%0A    private Date updatedAt;
 %0A%09%0A    p
@@ -1198,18 +1198,332 @@
 %0A    %7D%0A%0A
-%0A%09
+    public Date getCreatedAt() %7B%0A        return createdAt;%0A    %7D%0A%0A    public void setCreatedAt(Date createdAt) %7B%0A        this.createdAt = createdAt;%0A    %7D%0A%0A    public Date getUpdatedAt() %7B%0A        return updatedAt;%0A    %7D%0A%0A    public void setUpdatedAt(Date updatedAt) %7B%0A        this.updatedAt = updatedAt;%0A    %7D%0A%0A    
 @Overrid

Add createdAt and updatedAt in USer entity