# table & field mapping
config.tx_extbase {
	objects {
		TYPO3\T3extblog\Service\SessionServiceInterface.className = TYPO3\T3extblog\Service\SessionService
		TYPO3\T3extblog\Service\AuthenticationServiceInterface.className = TYPO3\T3extblog\Service\AuthenticationService
		TYPO3\T3extblog\Service\NotificationServiceInterface.className = TYPO3\T3extblog\Service\NotificationService
		TYPO3\T3extblog\Service\SpamCheckServiceInterface.className = TYPO3\T3extblog\Service\SpamCheckService
		TYPO3\T3extblog\Service\LoggingServiceInterface.className = TYPO3\T3extblog\Service\LoggingService
	}

    persistence {
        classes {
	        TYPO3\T3extblog\Domain\Model\Post {
                mapping {
                    tableName = tx_t3blog_post
					columns {
						sorting.mapOnProperty = sorting
						tstamp.mapOnProperty = tstamp
						deleted.mapOnProperty = deleted
						hidden.mapOnProperty = hidden
						title.mapOnProperty = title
						author.mapOnProperty = author
						date.mapOnProperty = publishDate
						content.mapOnProperty = content
						allow_comments.mapOnProperty = allowComments
						cat.mapOnProperty = categories
						tagClouds.mapOnProperty = tagCloud
						number_views.mapOnProperty = numberOfViews
						meta_description.mapOnProperty = metaDescription
						meta_keywords.mapOnProperty = metaKeywords
						preview_mode.mapOnProperty = previewMode
						preview_text.mapOnProperty = previewText
						preview_image.mapOnProperty = previewImage
					}
                }
            }
	        TYPO3\T3extblog\Domain\Model\Content {
		        mapping {
			        tableName = tt_content
		        }
	        }
	        TYPO3\T3extblog\Domain\Model\Category {
                mapping {
                    tableName = tx_t3blog_cat
					columns {
						sorting.mapOnProperty = sorting
						tstamp.mapOnProperty = tstamp
						deleted.mapOnProperty = deleted
						hidden.mapOnProperty = hidden
						catname.mapOnProperty = name
						description.mapOnProperty = description
						parent_id.mapOnProperty = parentId
					}
                }
            }
	        TYPO3\T3extblog\Domain\Model\Comment {
                mapping {
                    tableName = tx_t3blog_com
					columns {
						sorting.mapOnProperty = sorting
						tstamp.mapOnProperty = tstamp
						deleted.mapOnProperty = deleted
						hidden.mapOnProperty = hidden
						title.mapOnProperty = title
						fk_post.mapOnProperty = postId
						author.mapOnProperty = author
						email.mapOnProperty = email
						website.mapOnProperty = website
						date.mapOnProperty = date
						text.mapOnProperty = text
						approved.mapOnProperty = approved
						spam.mapOnProperty = spam
						mails_sent.mapOnProperty = mailsSent
					}
                }
            }
	        TYPO3\CMS\Extbase\Domain\Model\BackendUser {
		        subclasses {
			        BackendUser = TYPO3\T3extblog\Domain\Model\BackendUser
		        }
	        }
	        TYPO3\T3extblog\Domain\Model\BackendUser {
		        mapping {
			        tableName = be_users
		        }
	        }
	        TYPO3\T3extblog\Domain\Model\Subscriber {
                mapping {
                    tableName = tx_t3blog_com_nl
					columns {
						tstamp.mapOnProperty = tstamp
						deleted.mapOnProperty = deleted
						hidden.mapOnProperty = hidden
						name.mapOnProperty = name
						email.mapOnProperty = email
						post_uid.mapOnProperty = postUid
						lastsent.mapOnProperty = lastSent
						code.mapOnProperty = code
					}
                }
            }
    	}
    }
}

# Configure BE module
# When this default TS is added to static TS templates instead, we run into issues regarding link generation (RealUrl)
module.tx_t3extblog {
	email < plugin.tx_t3extblog.email

	features < plugin.tx_t3extblog.features

	settings < plugin.tx_t3extblog.settings
}