forked from baskbuddy/zhangshun
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.7 KiB
63 lines
1.7 KiB
package com.mydreamjob.onboarding;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.EntityListeners;
|
|
import jakarta.persistence.GeneratedValue;
|
|
import jakarta.persistence.GenerationType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.Table;
|
|
import jakarta.persistence.UniqueConstraint;
|
|
import jakarta.persistence.Version;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import org.springframework.data.annotation.CreatedDate;
|
|
import org.springframework.data.annotation.LastModifiedDate;
|
|
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
@Data
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@Entity
|
|
@Table(
|
|
name = "company_knowledge",
|
|
uniqueConstraints = @UniqueConstraint(
|
|
name = "uk_company_knowledge_company",
|
|
columnNames = "company_id"))
|
|
@EntityListeners(AuditingEntityListener.class)
|
|
public class CompanyKnowledge {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(name = "company_id", nullable = false)
|
|
private Long companyId;
|
|
|
|
@Column(length = 2000)
|
|
private String culture;
|
|
|
|
@Column(name = "work_policies", length = 4000)
|
|
private String workPolicies;
|
|
|
|
@Column(name = "onboarding_guide", length = 4000)
|
|
private String onboardingGuide;
|
|
|
|
@Version
|
|
@Column(nullable = false)
|
|
@Builder.Default
|
|
private Long version = 0L;
|
|
|
|
@CreatedDate
|
|
@Column(name = "created_at", nullable = false, updatable = false)
|
|
private LocalDateTime createdAt;
|
|
|
|
@LastModifiedDate
|
|
@Column(name = "updated_at", nullable = false)
|
|
private LocalDateTime updatedAt;
|
|
}
|
|
|