/*
 * Copyright 2016 Gustavo Pacheco.
 *
 * 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 co.edu.unicartagena.platf.entity;

import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;

/**
 *
 * @author Gustavo Pacheco <ryctabo@gmail.com>
 * @version 1.0
 */
@Entity
@PrimaryKeyJoinColumn(referencedColumnName = "id")
public class Person extends User {
    
    private String name;
    
    private String lastname;

    public Person() {
    }

    public Person(String email, String password) {
        super(email, password);
    }

    public Person(String username, String email, String password) {
        super(username, email, password);
    }

    public Person(String name, String lastname, String email, String password) {
        super(email, password);
        this.name = name;
        this.lastname = lastname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    @Override
    public String toString() {
        return String.format("%s %s", this.name, this.lastname);
    }
    
}

@@ -637,16 +637,49 @@
 ntity;%0A%0A
+import javax.persistence.Column;%0A
 import j
@@ -820,16 +820,25 @@
 sion 1.0
+-SNAPSHOT
 %0A */%0A@En
@@ -929,24 +929,50 @@
 User %7B%0A    %0A
+    @Column(length = 100)%0A
     private 
@@ -985,24 +985,70 @@
  name;%0A    %0A
+    @Column(name = %22last_name%22, length = 100)%0A
     private 
@@ -1054,25 +1054,25 @@
  String last
-n
+N
 ame;%0A%0A    pu
@@ -1343,17 +1343,17 @@
 ing last
-n
+N
 ame, Str
@@ -1449,33 +1449,33 @@
        this.last
-n
+N
 ame = lastname;%0A
@@ -1460,33 +1460,33 @@
 .lastName = last
-n
+N
 ame;%0A    %7D%0A%0A    
@@ -1632,25 +1632,25 @@
 ring getLast
-n
+N
 ame() %7B%0A    
@@ -1660,25 +1660,25 @@
  return last
-n
+N
 ame;%0A    %7D%0A%0A
@@ -1700,17 +1700,17 @@
  setLast
-n
+N
 ame(Stri
@@ -1712,25 +1712,25 @@
 (String last
-n
+N
 ame) %7B%0A     
@@ -1741,17 +1741,17 @@
 his.last
-n
+N
 ame = la
@@ -1752,17 +1752,17 @@
 e = last
-n
+N
 ame;%0A   
@@ -1868,17 +1868,17 @@
 his.last
-n
+N
 ame);%0A  

Change lastname of lastName and assign Column for JPA