package models
import org.squeryl._
import org.squeryl.dsl._
import forms._
case class Notify(message: String, atach: AtachForm, announceId: Long, notifyType: Long, partId: Long, designChangeId: Long, var state: Int) extends KeyedEntity[Long]{
	val id: Long = 0
	lazy val user: ManyToOne[User] = PartsListDb.userNotifies.right(this)
	lazy val replies : OneToMany[Reply] = PartsListDb.NotifyReplies.left(this)
	lazy val part: ManyToOne[Part] = PartsListDb.partsNotifies.right(this)
	lazy val atachs: OneToMany[Atach] = PartsListDb.notifyAtachs.left(this)
	lazy val designCgange : ManyToOne[DesignChange] = PartsListDb.designChangeNotifies.right(this)
}