package com.ffii.fpsms.modules.common.mail.entity

import com.ffii.core.entity.BaseEntity
import jakarta.persistence.*
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size

@Entity
@Table(name = "mail_template")
open class MailTemplate : BaseEntity<Long>() {
    @Column(name = "`to`")
    open var to: String? = null

    @Column(name = "cc")
    open var cc: String? = null

    @Size(max = 255)
    @NotNull
    @Column(name = "code", nullable = false)
    open var code: String? = null

    @Size(max = 255)
    @NotNull
    @Column(name = "description", nullable = false)
    open var description: String? = null

    @Size(max = 30)
    @Column(name = "type", length = 30)
    open var type: String? = null

    @Size(max = 255)
    @Column(name = "params")
    open var params: String? = null

    @Column(name = "subjectCht")
    open var subjectCht: String? = null

    @Column(name = "subjectEng")
    open var subjectEng: String? = null

    @Lob
    @Column(name = "contentCht")
    open var contentCht: String? = null

    @Lob
    @Column(name = "contentEng")
    open var contentEng: String? = null
}