package com.publiccms.entities.cms;
// Generated 2026-1-25 11:00:49 by Hibernate Tools 5.6.15.Final

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * CmsContentSource generated by hbm2java
 */
@Entity
@Table(name = "cms_content_source")
public class CmsContentSource implements java.io.Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @GeneratorColumn(title = "ID")
    private Long id;
    @GeneratorColumn(title = "站点", condition = true)
    @JsonIgnore
    private short siteId;
    /**
     * name
     * 
     * 名称
     */
    @GeneratorColumn(title = "名称", condition = true, like = true, or = true, name = "name")
    private String name;
    /**
     * url
     * 
     * 地址
     */
    @GeneratorColumn(title = "地址", condition = true, like = true, or = true, name = "name")
    private String url;
    /**
     * initial
     * 
     * 首字母
     */
    @GeneratorColumn(title = "首字母", condition = true, like = true, or = true, name = "name")
    private String initial;
    /**
     * create user
     * 
     * 创建用户
     */
    @GeneratorColumn(title = "创建用户", condition = true)
    private Long userId;
    /**
     * create date
     * 
     * 创建日期
     */
    @GeneratorColumn(title = "创建日期", order = true)
    private Date createDate;

    public CmsContentSource() {
    }

    public CmsContentSource(short siteId, String name, Date createDate) {
        this.siteId = siteId;
        this.name = name;
        this.createDate = createDate;
    }

    public CmsContentSource(long id, short siteId, String name, String url, String initial, Long userId, Date createDate) {
        this.id = id;
        this.siteId = siteId;
        this.name = name;
        this.url = url;
        this.initial = initial;
        this.userId = userId;
        this.createDate = createDate;
    }

    @Id
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Column(name = "site_id", nullable = false)
    public short getSiteId() {
        return this.siteId;
    }

    public void setSiteId(short siteId) {
        this.siteId = siteId;
    }

    @Column(name = "name", nullable = false, length = 100)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "url")
    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Column(name = "initial", length = 5)
    public String getInitial() {
        return this.initial;
    }

    public void setInitial(String initial) {
        this.initial = initial;
    }

    @Column(name = "user_id")
    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

}
