package com.bocloud.ims.entity.resource.pbm;

import com.bocloud.common.utils.DateDeserializer;
import com.bocloud.common.utils.DateSerializer;
import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreUpdate;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.Generic;
import com.bocloud.entity.meta.PKStrategy;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * vcenter存储策略
 * 
 * @author wangyu
 * @version 1.0
 * @since 2020年6月15日
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Table("pbm_profile")
public class PbmProfile extends Generic {

	@PK(PKStrategy.AUTO)
	private Long id;
	// profile id
	@Column("profile_id")
	private String profileId;
	// 名称
	@Column("name")
	private String name;
	// 描述
	@Column("remark")
	private String remark;
	// 创建者
	@Column("created_by")
	private String createdBy;
	// 创建时间
	@IgnoreUpdate
	@Column(value = "create_time", nullable = false)
	@JsonSerialize(using = DateSerializer.class)
	@JsonDeserialize(using = DateDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	// 类型
	@Column("type")
	private String type;
	// 云平台ID
	@Column("vendor_id")
	private Long vendorId;
}
