Skip to content

Instantly share code, notes, and snippets.

@theflofly
Last active February 14, 2016 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theflofly/48039fb653da38e3ef67 to your computer and use it in GitHub Desktop.
Save theflofly/48039fb653da38e3ef67 to your computer and use it in GitHub Desktop.
package com.tcb.issue1.model;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
/**
* This class represents a car.
*
* Created by Florian.Courtial on 11/01/16.
*/
@Data
@Document(indexName="db", type="car")
public class Car {
@Id
private String id;
@Field(type = FieldType.String)
private String model;
@Field(type = FieldType.Integer)
private int milesNumber;
@Field(type = FieldType.Integer)
private int age;
public Car(String id, String model, int milesNumber, int age) {
this.id = id;
this.model = model;
this.milesNumber = milesNumber;
this.age = age;
}
public Car() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment