package com.example.removetolocal.newtrain.entity;

import com.example.removetolocal.config.BeanHelper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.modelmapper.ModelMapper;

import javax.persistence.*;
import java.util.Date;

/**
 * entity class for train_theme
*/
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "train_theme")
public class TrainTheme {

	/**
	* trainId
	*/
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "train_id")
	private Integer trainId;
	/**
	* endTime
	*/
	@Column(name = "end_time")
	private Date endTime;
	/**
	* good
	*/
	@Column(name = "good")
	private Integer good;
	/**
	* isCertificate
	*/
	@Column(name = "is_certificate")
	private Integer isCertificate;
	/**
	* joinUserId
	*/
	@Column(name = "join_user_id")
	private String joinUserId;
	/**
	* name
	*/
	@Column(name = "name")
	private String name;
	/**
	* noJoinUserId
	*/
	@Column(name = "no_join_user_id")
	private String noJoinUserId;
	/**
	* originatorId
	*/
	@Column(name = "originator_id")
	private Integer originatorId;
	/**
	* originatorName
	*/
	@Column(name = "originator_name")
	private String originatorName;
	/**
	* pass
	*/
	@Column(name = "pass")
	private Integer pass;
	/**
	* signUp
	*/
	@Column(name = "sign_up")
	private String signUp;
	/**
	* speakerUserId
	*/
	@Column(name = "speaker_user_id")
	private String speakerUserId;
	/**
	* startTime
	*/
	@Column(name = "start_time")
	private Date startTime;
	/**
	* trainDataName
	*/
	@Column(name = "train_data_name")
	private String trainDataName;
	/**
	* trainDataUrl
	*/
	@Column(name = "train_data_url")
	private String trainDataUrl;
	/**
	* trainLocation
	*/
	@Column(name = "train_location")
	private String trainLocation;
	/**
	* trainStatus
	*/
	@Column(name = "train_status")
	private Integer trainStatus;
	/**
	* trainSynopsis
	*/
	@Column(name = "train_synopsis")
	private String trainSynopsis;
	/**
	* trainTime
	*/
	@Column(name = "train_time")
	private Date trainTime;
	/**
	* trainingResults
	*/
	@Column(name = "training_results")
	private String trainingResults;
	/**
	* unitsId
	*/
	@Column(name = "units_id")
	private Integer unitsId;
	/**
	* unitsName
	*/
	@Column(name = "units_name")
	private String unitsName;
	/**
	* trainPapersName
	*/
	@Column(name = "train_papers_name")
	private String trainPapersName;
	/**
	* trainPapersUrl
	*/
	@Column(name = "train_papers_url")
	private String trainPapersUrl;
	/**
	* recordId
	*/
	@Column(name = "record_id")
	private String recordId;

	public TrainTheme( String name, Date trainTime, String originatorName, Integer originatorId, String unitsName, Integer unitsId, Date startTime, Date endTime, String trainLocation, String speakerUserId, String trainDataName, String trainDataUrl, String trainSynopsis, String trainingResults, Integer trainStatus, Integer isCertificate, Integer pass, Integer good, String trainPapersUrl, String trainPapersName, String recordId) {
		this.name = name;
		this.trainTime = trainTime;
		this.originatorName = originatorName;
		this.originatorId = originatorId;
		this.unitsName = unitsName;
		this.unitsId = unitsId;
		this.startTime = startTime;
		this.endTime = endTime;
		this.trainLocation = trainLocation;
		this.speakerUserId = speakerUserId;
		this.trainDataName = trainDataName;
		this.trainDataUrl = trainDataUrl;
		this.trainSynopsis = trainSynopsis;
		this.trainingResults = trainingResults;
		this.trainStatus = trainStatus;
		this.isCertificate = isCertificate;
		this.pass = pass;
		this.good = good;
		this.trainPapersUrl = trainPapersUrl;
		this.trainPapersName = trainPapersName;
		this.recordId = recordId;
	}

	public com.example.removetolocal.newentity.entity.TrainTheme toST() {
		ModelMapper mapper = BeanHelper.getUserMapper();
		return mapper.map(this, com.example.removetolocal.newentity.entity.TrainTheme.class);
	}
}
