Last active
March 24, 2019 18:40
-
-
Save RyanSusana/12779e1570430139f7e0f0ff56ad051b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.elepy.annotations.*; | |
import com.elepy.models.TextType; | |
@RestModel(slug = "/products", name = "Name") | |
public class Product { | |
@Identifier | |
private String id; | |
@Number(minimum = 0) | |
private BigDecimal price; | |
@Unique | |
@Searchable | |
private String name; | |
@DateTime(maximumDate = "2050-01-01") | |
private Date expirationDate; | |
@Text(TextType.TEXTAREA) | |
private String shortDescription; | |
@Text(TextType.HTML) | |
@PrettyName("This is a detailed description of the Product") | |
private String longDescription; | |
// Getters and setters. I like to use Project Lombok to automate this :D | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment