package com.apobates.forum.core.entity.proxy;

import com.apobates.forum.core.entity.Posts;
import com.apobates.forum.core.entity.Topic;
import com.apobates.forum.core.entity.TopicActionCollection;
import com.apobates.forum.utils.lang.ForumReplicable;
import java.util.function.Function;

/**
 *
 * @author xiaofanku
 * @since 20200520
 */
public final class TopicActionCollectionReplica extends TopicActionCollection implements ForumReplicable<TopicActionCollection, TopicActionCollectionReplica>{
    private Posts posts;
    private Topic topic;
    public static Function<TopicActionCollection,TopicActionCollectionReplica> copyTopicAction = (TopicActionCollection tac)->{
        return ForumReplicable.replica(tac, TopicActionCollectionReplica.class).orElseGet(TopicActionCollectionReplica::new);
    };
    
    public TopicActionCollectionReplica(){
        super();
    }
    
    public Posts getPosts() {
        return posts;
    }
    public void setPosts(Posts posts) {
        this.posts = posts;
    }
    //
    public Topic getTopic() {
        return topic;
    }
    public void setTopic(Topic topic) {
        this.topic = topic;
    }
}