package com.xunmei.core.resumption.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author oygj
 * @since 2023-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_app_todo")
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Todo对象", description = "")
public class Todo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @ApiModelProperty(value = "应用")
    @TableField("app_id")
    private Long appId;

    @ApiModelProperty(value = "标题名称，一个应用下可能会有多种标题，如每日履职对应每小时和每日")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "内容")
    @TableField("content")
    private String content;

    @ApiModelProperty(value = "待办开始时间")
    @TableField("date")
    private Date date;

    @ApiModelProperty(value = "待办结束时间")
    @TableField("end_date")
    private Date endDate;

    @ApiModelProperty(value = "待办的过期（删除）时间，某些类型的待办结束了仍可执行")
    @TableField("over_date")
    private Date overDate;

    @ApiModelProperty(value = "扩展字段")
    @TableField("extra")
    private String extra;

    @ApiModelProperty(value = "机构")
    @TableField("org_id")
    private Long orgId;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime=new Date();

    @ApiModelProperty(value = "最后修改人id")
    @TableField("modified_id")
    private Long modifiedId;

    @ApiModelProperty(value = "修改人名称")
    @TableField("modified_name")
    private String modifiedName;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "服务商")
    @TableField("service_id")
    private Long serviceId;

    @TableField("detail_info")
    private String detailInfo;

//    @TableField(exist = false)
//    private App app;

    @TableField(exist = false)
    private List<TodoUser> users;

    @TableField(exist = false)
    private List<TodoRole> roles;

}
