package com.example.system.model;

import com.example.system.utils.DateUtil;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@Entity
@Table(name = "article_table")
public class ArticleTable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY) // 假设使用的是自增主键
    private Integer articleId;

    private Integer userId;

    @Column(name = "competition_id") // 明确指定数据库中的列名
    private Integer competitionId;

    private String articleTitle;

    private String briefContent;

    private String articleContent;

    private String articleType;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date publishTime;
}