Article.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package com.hssx.ysofficial.entity;
  2. import com.baomidou.mybatisplus.annotation.TableName;
  3. import com.baomidou.mybatisplus.annotation.IdType;
  4. import com.baomidou.mybatisplus.extension.activerecord.Model;
  5. import com.baomidou.mybatisplus.annotation.TableId;
  6. import com.baomidou.mybatisplus.annotation.TableField;
  7. import java.io.Serializable;
  8. import lombok.Data;
  9. import lombok.EqualsAndHashCode;
  10. import lombok.experimental.Accessors;
  11. /**
  12. * <p>
  13. *
  14. * </p>
  15. *
  16. * @author Reiskuchen
  17. * @since 2019-10-23
  18. */
  19. @Data
  20. @EqualsAndHashCode(callSuper = false)
  21. @Accessors(chain = true)
  22. @TableName("article")
  23. public class Article extends Model<Article> {
  24. private static final long serialVersionUID=1L;
  25. /**
  26. * id
  27. */
  28. @TableId(value = "id", type = IdType.AUTO)
  29. private Integer id;
  30. /**
  31. * the title of articles
  32. */
  33. @TableField("title")
  34. private String title;
  35. /**
  36. * the content of article
  37. */
  38. @TableField("content")
  39. private String content;
  40. /**
  41. * the type of article
  42. */
  43. @TableField("type")
  44. private String type;
  45. /**
  46. * whether the article is sticked or not
  47. */
  48. @TableField("sticky")
  49. private Integer sticky;
  50. /**
  51. * the position of article in the list
  52. */
  53. @TableField("position")
  54. private Integer position;
  55. @Override
  56. protected Serializable pkVal() {
  57. return this.id;
  58. }
  59. }