package com.publiccms.entities.sys;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;

// Generated 2016-1-19 11:28:06 by Hibernate Tools 4.3.1

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

import com.publiccms.common.generator.annotation.GeneratorColumn;

/**
 * SysRoleModule generated by hbm2java
 */
@Entity
@Table(name = "sys_role_module")
@DynamicUpdate
public class SysRoleModule implements java.io.Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @GeneratorColumn(title = "ID")
    private SysRoleModuleId id;

    public SysRoleModule() {
    }

    public SysRoleModule(SysRoleModuleId id) {
        this.id = id;
    }

    @EmbeddedId

    @AttributeOverrides({ @AttributeOverride(name = "roleId", column = @Column(name = "role_id", nullable = false)),
            @AttributeOverride(name = "moduleId", column = @Column(name = "module_id", nullable = false, length = 30)) })
    public SysRoleModuleId getId() {
        return this.id;
    }

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

}
