kekrozsak/src/KekRozsak/FrontBundle/Resources/config/doctrine/ForumTopic.orm.yml

52 lines
1.7 KiB
YAML

KekRozsak\FrontBundle\Entity\ForumTopic:
type: entity
table: forum_topics
id:
id:
type: integer
generator:
strategy: AUTO
fields:
title:
type: string(100)
nullable: false
slug:
type: string(100)
nullable: false
unique: true
created_at:
type: datetime
nullable: false
updated_at:
type: datetime
nullable: true
update_reason:
type: text
nullable: true
oneToMany:
posts:
targetEntity: ForumPost
mappedBy: topic
manyToOne:
created_by:
targetEntity: User
inversedBy: articles
nullable: false
updated_by:
targetEntity: User
nullable: true
default: null
topic_group:
targetEntity: ForumTopicGroup
inversedBy: topics
nullable: false
oneToOne:
last_post:
targetEntity: ForumPost
nullable: true
default: null
cascade: [ persist ]
uniqueConstraint:
uniqueSlugByGroup:
columns: [ topic_group, slug ]