package com.bocloud.ims.entity.middleware;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 关系型数据库
 *
 * @author weiwei
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("rds_db")
public class RdsDb extends GenericEntity {

    @PK(PKStrategy.AUTO)
    private Long id;// ID
    @Column("character_set")
    private String characterSet;// 字符集
    @Column("collation_rule")
    private String collation;// 排序规则
    @Column("collctype")
    private String collctype;// 字符分类
    @Column("rds_id")
    private Long rdsId;// 所属数据库服务
    @Column("engine")
    private String engine;
    @Column("accounts")
    private String accounts;
    @Column("vendor_id")
    private Long vendorId;
    @IgnoreAll
    private String address;
    @IgnoreAll
    private String users;
    
    @IgnoreAll
    private Long accountId;
    @IgnoreAll
	private String accountPrivilege;

    /**
     * @param characterSet
     * @param collation
     * @param rdsId
     */
    public RdsDb(String characterSet, String collation, Long rdsId) {
        super();
        this.characterSet = characterSet;
        this.collation = collation;
        this.rdsId = rdsId;
    }

    public RdsDb(String characterSet, String collation, String collctype, Long rdsId) {
        super();
        this.characterSet = characterSet;
        this.collation = collation;
        this.collctype = collctype;
        this.rdsId = rdsId;
    }

}
