/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.app.plugin.prov;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.ligoj.app.plugin.prov.model.ResourceType;
import org.ligoj.bootstrap.core.model.AbstractNamedAuditedEntity;

import lombok.Getter;
import lombok.Setter;

/**
 * Tag for edition.
 */
@Getter
@Setter
public class TagEditionVo extends AbstractNamedAuditedEntity<Integer> {
	
	public static final String NAME_PATTERN = "[\\-_.a-zA-Z0-9]+";
	public static final String VALUE_PATTERN = "[\\-_./a-zA-Z0-9]+";

	/**
	 * SID
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Object name
	 */
	@NotBlank
	@Pattern(regexp = NAME_PATTERN)
	private String name;

	/**
	 * Value as string.
	 */
	@Size(max = 1024, min = 1)
	private String value;

	/**
	 * The attached resource type.
	 */
	@NotNull
	private ResourceType type;

	/**
	 * The related resource identifier. This is not a strong relationship, and this is intended. We don't want to handle
	 * one column per resource type.
	 */
	@NotNull
	private Integer resource;

}

@@ -379,40 +379,20 @@
 ore.
-model.AbstractNamedAuditedEntity
+INamableBean
 ;%0A%0Ai
@@ -509,42 +509,31 @@
 nVo 
-extends AbstractNamedAuditedEntity
+implements INamableBean
 %3CInt
@@ -540,17 +540,16 @@
 eger%3E %7B%0A
-%09
 %0A%09public
@@ -690,16 +690,16 @@
 ID%0A%09 */%0A
-
 %09private
@@ -741,16 +741,99 @@
  = 1L;%0A%0A
+%09/**%0A%09 * Internal identifier. Might be removed later...%0A%09 */%0A%09private Integer id;%0A%0A
 %09/**%0A%09 *

Remove useless @NotNull from REST Tag API