ZenBaseModel.kt 831 B

1234567891011121314151617181920212223242526272829
  1. package com.gxzc.zen.persistence
  2. import com.baomidou.mybatisplus.annotations.TableField
  3. import com.baomidou.mybatisplus.annotations.TableId
  4. import com.baomidou.mybatisplus.enums.IdType
  5. import com.fasterxml.jackson.databind.annotation.JsonSerialize
  6. import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
  7. import java.io.Serializable
  8. import java.util.*
  9. /**
  10. * Created by mgr on 2018/1/23.
  11. */
  12. abstract class ZenBaseModel: Serializable {
  13. @JsonSerialize(using = ToStringSerializer::class)
  14. @TableId(type = IdType.ID_WORKER)
  15. var id:Long?=null
  16. var createBy:String?=null
  17. var createTime: Date?=null
  18. var updateBy:String?=null
  19. var updateTime: Date?=null
  20. var remark:String?=null
  21. var enable:Int?=null
  22. @TableField(exist = false)
  23. var map:Map<String,Any?>?=null
  24. open fun preHandle(){}
  25. }