Skip to content

Commit 5f1d693

Browse files
committed
Hibernate testing configuration
1 parent c4b3001 commit 5f1d693

File tree

12 files changed

+512
-0
lines changed

12 files changed

+512
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
3+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
4+
<hibernate-mapping>
5+
<class catalog="jangosauth" name="eu.jangos.auth.model.Account" optimistic-lock="version" table="account">
6+
<id name="id" type="java.lang.Integer">
7+
<column name="id"/>
8+
<generator class="identity"/>
9+
</id>
10+
<many-to-one class="eu.jangos.auth.model.Locale" fetch="select" name="locale">
11+
<column name="fk_locale">
12+
<comment>The locale used by this client</comment>
13+
</column>
14+
</many-to-one>
15+
<many-to-one class="eu.jangos.auth.model.Realm" fetch="select" name="realm">
16+
<column name="fk_prefrealm">
17+
<comment>ID of the preferred realm for this account.</comment>
18+
</column>
19+
</many-to-one>
20+
<property name="name" type="string">
21+
<column length="30" name="name" not-null="true" unique="true">
22+
<comment>Name of the account, used within the WoW client to logon.</comment>
23+
</column>
24+
</property>
25+
<property name="hashPass" type="string">
26+
<column length="40" name="hash_pass" not-null="true">
27+
<comment>Hash of the account, according to SRP6 spec: H(I | ":" | P) where H is SHA1 algorithm. Generated at account creation time.</comment>
28+
</column>
29+
</property>
30+
<property name="sessionkey" type="string">
31+
<column name="sessionkey">
32+
<comment>Storing the session key for reconnect operations.</comment>
33+
</column>
34+
</property>
35+
<property name="verifier" type="string">
36+
<column name="verifier">
37+
<comment>According to the SRP6 specs, this is the client's password verifier. It is calculated at the first authentication time (avoiding to recalculate hash each
38+
time).</comment>
39+
</column>
40+
</property>
41+
<property name="salt" type="string">
42+
<column name="salt">
43+
<comment>According to the SRP6 specs, this is the server salt. It is calculated at the first authentication time (avoiding to recalculate hash each
44+
time).</comment>
45+
</column>
46+
</property>
47+
<property name="email" type="string">
48+
<column length="50" name="email">
49+
<comment>Account Owner's email.</comment>
50+
</column>
51+
</property>
52+
<property name="creation" type="timestamp">
53+
<column length="19" name="creation" not-null="true">
54+
<comment>Account creation time (for records).</comment>
55+
</column>
56+
</property>
57+
<property name="lastIp" type="string">
58+
<column length="30" name="lastIP" not-null="true">
59+
<comment>Last IP used for this account.</comment>
60+
</column>
61+
</property>
62+
<property name="failedattempt" type="int">
63+
<column name="failedattempt" not-null="true">
64+
<comment>Number of failed attempt made for this account.</comment>
65+
</column>
66+
</property>
67+
<property name="locked" type="boolean">
68+
<column name="locked" not-null="true">
69+
<comment>Indicates whether this account is locked or not.</comment>
70+
</column>
71+
</property>
72+
<property name="lastlogin" type="timestamp">
73+
<column length="19" name="lastlogin" not-null="true">
74+
<comment>Timestamp of the last login performed by this account.</comment>
75+
</column>
76+
</property>
77+
<set fetch="select" inverse="true" lazy="true" name="bannedaccountsForFkBannedby" table="bannedaccount">
78+
<key>
79+
<column name="fk_bannedby" not-null="true">
80+
<comment>Foreign Key to account indicating who is the requestor of the ban.</comment>
81+
</column>
82+
</key>
83+
<one-to-many class="eu.jangos.auth.model.Bannedaccount"/>
84+
</set>
85+
<set fetch="select" inverse="false" lazy="true" name="roleses" table="account_roles">
86+
<key>
87+
<column name="fk_account" not-null="true"/>
88+
</key>
89+
<many-to-many entity-name="eu.jangos.auth.model.Roles">
90+
<column name="fk_roles" not-null="true"/>
91+
</many-to-many>
92+
</set>
93+
<set fetch="select" inverse="true" lazy="true" name="bannedips" table="bannedip">
94+
<key>
95+
<column name="fk_bannedby" not-null="true">
96+
<comment>Foreign Key to account indicating who is the requestor of the ban.</comment>
97+
</column>
98+
</key>
99+
<one-to-many class="eu.jangos.auth.model.Bannedip"/>
100+
</set>
101+
<set fetch="select" inverse="true" lazy="true" name="bannedaccountsForFkBannedaccount" table="bannedaccount">
102+
<key>
103+
<column name="fk_bannedaccount" not-null="true">
104+
<comment>ID of the banned account.</comment>
105+
</column>
106+
</key>
107+
<one-to-many class="eu.jangos.auth.model.Bannedaccount"/>
108+
</set>
109+
<set fetch="select" inverse="true" lazy="true" name="realmAccounts" table="realm_account">
110+
<key>
111+
<column name="fk_account" not-null="true">
112+
<comment>Foreign key to the account.</comment>
113+
</column>
114+
</key>
115+
<one-to-many class="eu.jangos.auth.model.RealmAccount"/>
116+
</set>
117+
</class>
118+
</hibernate-mapping>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
4+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
5+
<hibernate-mapping>
6+
<class name="eu.jangos.auth.model.Bannedaccount" table="bannedaccount" catalog="jangosauth">
7+
<id name="id" type="java.lang.Integer">
8+
<column name="id" />
9+
<generator class="identity"></generator>
10+
</id>
11+
<many-to-one name="accountByFkBannedby" class="eu.jangos.auth.model.Account" fetch="select">
12+
<column name="fk_bannedby" not-null="true">
13+
<comment>Foreign Key to account indicating who is the requestor of the ban.</comment>
14+
</column>
15+
</many-to-one>
16+
<many-to-one name="accountByFkBannedaccount" class="eu.jangos.auth.model.Account" fetch="select">
17+
<column name="fk_bannedaccount" not-null="true">
18+
<comment>ID of the banned account.</comment>
19+
</column>
20+
</many-to-one>
21+
<property name="bandate" type="timestamp">
22+
<column name="bandate" length="19" not-null="true">
23+
<comment>Date of the ban.</comment>
24+
</column>
25+
</property>
26+
<property name="unban" type="timestamp">
27+
<column name="unban" length="19">
28+
<comment>Date of the unban (may be null for unlimited ban).</comment>
29+
</column>
30+
</property>
31+
<property name="reason" type="string">
32+
<column name="reason" not-null="true">
33+
<comment>Short message indicating why this account has been banned.</comment>
34+
</column>
35+
</property>
36+
<property name="active" type="boolean">
37+
<column name="active" not-null="true">
38+
<comment>Indicate whether this ban record is active or not.</comment>
39+
</column>
40+
</property>
41+
</class>
42+
</hibernate-mapping>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
4+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
5+
<hibernate-mapping>
6+
<class name="eu.jangos.auth.model.Bannedip" table="bannedip" catalog="jangosauth">
7+
<id name="id" type="java.lang.Integer">
8+
<column name="id" />
9+
<generator class="identity"></generator>
10+
</id>
11+
<many-to-one name="account" class="eu.jangos.auth.model.Account" fetch="select">
12+
<column name="fk_bannedby" not-null="true">
13+
<comment>Foreign Key to account indicating who is the requestor of the ban.</comment>
14+
</column>
15+
</many-to-one>
16+
<property name="ip" type="string">
17+
<column name="ip" length="30" not-null="true">
18+
<comment>The banned IP.</comment>
19+
</column>
20+
</property>
21+
<property name="date" type="timestamp">
22+
<column name="date" length="19" not-null="true">
23+
<comment>Date of the ban.</comment>
24+
</column>
25+
</property>
26+
<property name="unban" type="timestamp">
27+
<column name="unban" length="19">
28+
<comment>Date of the unban (may be null for unlimited ban).</comment>
29+
</column>
30+
</property>
31+
<property name="reason" type="string">
32+
<column name="reason" not-null="true">
33+
<comment>Short message indicating why this account has been banned.</comment>
34+
</column>
35+
</property>
36+
<property name="active" type="boolean">
37+
<column name="active" not-null="true">
38+
<comment>Indicate whether this ban record is active or not.</comment>
39+
</column>
40+
</property>
41+
</class>
42+
</hibernate-mapping>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
4+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
5+
<hibernate-mapping>
6+
<class name="eu.jangos.auth.model.Commands" table="commands" catalog="jangosauth">
7+
<id name="id" type="java.lang.Integer">
8+
<column name="id" />
9+
<generator class="identity"></generator>
10+
</id>
11+
<property name="name" type="string">
12+
<column name="name" length="35" not-null="true">
13+
<comment>Name of the command</comment>
14+
</column>
15+
</property>
16+
<property name="description" type="string">
17+
<column name="description" length="60" not-null="true">
18+
<comment>A short description of the command.</comment>
19+
</column>
20+
</property>
21+
<set name="roleses" table="commands_roles" inverse="false" lazy="true" fetch="select">
22+
<key>
23+
<column name="fk_commands" not-null="true" />
24+
</key>
25+
<many-to-many entity-name="eu.jangos.auth.model.Roles">
26+
<column name="fk_roles" not-null="true" />
27+
</many-to-many>
28+
</set>
29+
</class>
30+
</hibernate-mapping>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
4+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
5+
<hibernate-mapping>
6+
<class name="eu.jangos.auth.model.Locale" table="locale" catalog="jangosauth">
7+
<id name="id" type="int">
8+
<column name="id" />
9+
<generator class="assigned"></generator>
10+
</id>
11+
<property name="locale" type="string">
12+
<column name="locale" length="30" not-null="true">
13+
<comment>Locale common name.</comment>
14+
</column>
15+
</property>
16+
<property name="localeString" type="string">
17+
<column name="localeString" length="45" not-null="true">
18+
<comment>String like the WoW client is sending it to the server.</comment>
19+
</column>
20+
</property>
21+
<set name="accounts" table="account" inverse="true" lazy="true" fetch="select">
22+
<key>
23+
<column name="fk_locale">
24+
<comment>The locale used by this client</comment>
25+
</column>
26+
</key>
27+
<one-to-many class="eu.jangos.auth.model.Account" />
28+
</set>
29+
</class>
30+
</hibernate-mapping>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
3+
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
4+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
5+
<hibernate-mapping>
6+
<class name="eu.jangos.auth.model.Parameter1" table="parameter1" catalog="jangosauth">
7+
<id name="id" type="java.lang.Integer">
8+
<column name="id" />
9+
<generator class="identity"></generator>
10+
</id>
11+
<property name="param" type="string">
12+
<column name="param" length="50" not-null="true">
13+
<comment>key of the parameter</comment>
14+
</column>
15+
</property>
16+
<property name="val" type="string">
17+
<column name="val" not-null="true">
18+
<comment>Value of the parameter.</comment>
19+
</column>
20+
</property>
21+
</class>
22+
</hibernate-mapping>
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
3+
<!-- Generated 01-f?vr.-2016 22:32:31 by Hibernate Tools 4.3.1 -->
4+
<hibernate-mapping>
5+
<class catalog="jangosauth" name="eu.jangos.auth.model.Realm" optimistic-lock="version" table="realm">
6+
<id name="id" type="java.lang.Integer">
7+
<column name="id"/>
8+
<generator class="identity"/>
9+
</id>
10+
<many-to-one class="eu.jangos.auth.model.Realmtimezone" fetch="select" name="realmtimezone">
11+
<column name="fk_timezone" not-null="true">
12+
<comment>Foreign key to the timezone.</comment>
13+
</column>
14+
</many-to-one>
15+
<many-to-one class="eu.jangos.auth.model.Realmtype" fetch="select" name="realmtype">
16+
<column name="fk_realmtype" not-null="true">
17+
<comment>Foreign key to the Realm Type.</comment>
18+
</column>
19+
</many-to-one>
20+
<property name="name" type="string">
21+
<column length="32" name="name" not-null="true">
22+
<comment>Name of the realm.</comment>
23+
</column>
24+
</property>
25+
<property name="address" type="string">
26+
<column length="32" name="address" not-null="true">
27+
<comment>Address of the realm, may be a name of an ip.</comment>
28+
</column>
29+
</property>
30+
<property name="port" type="int">
31+
<column name="port" not-null="true">
32+
<comment>Listen port of the realm.</comment>
33+
</column>
34+
</property>
35+
<property name="population" type="float">
36+
<column name="population" not-null="true" precision="12" scale="0">
37+
<comment>Population calculated from (playerCount / maxPlayerCount * 2)</comment>
38+
</column>
39+
</property>
40+
<property name="maxPlayers" type="int">
41+
<column name="maxPlayers" not-null="true">
42+
<comment>The maximum number of players allowed on this realm.</comment>
43+
</column>
44+
</property>
45+
<property name="countPlayers" type="int">
46+
<column name="countPlayers" not-null="true">
47+
<comment>The number of players actually created on this realm.</comment>
48+
</column>
49+
</property>
50+
<property name="invalid" type="boolean">
51+
<column name="invalid" not-null="true">
52+
<comment>Means that this realm is invalid and must not be shown to the client.</comment>
53+
</column>
54+
</property>
55+
<property name="offline" type="boolean">
56+
<column name="offline" not-null="true">
57+
<comment>Means that this realm is offline.</comment>
58+
</column>
59+
</property>
60+
<property name="showversion" type="boolean">
61+
<column name="showversion" not-null="true">
62+
<comment>Means that the version of this realm must be shown to the client.</comment>
63+
</column>
64+
</property>
65+
<property name="newplayers" type="boolean">
66+
<column name="newplayers" not-null="true">
67+
<comment>Means that only the new players may join this realm.</comment>
68+
</column>
69+
</property>
70+
<property name="recommended" type="boolean">
71+
<column name="recommended" not-null="true">
72+
<comment>Display the recommended option in the client.</comment>
73+
</column>
74+
</property>
75+
<set fetch="select" inverse="true" lazy="true" name="accounts" table="account">
76+
<key>
77+
<column name="fk_prefrealm">
78+
<comment>ID of the preferred realm for this account.</comment>
79+
</column>
80+
</key>
81+
<one-to-many class="eu.jangos.auth.model.Account"/>
82+
</set>
83+
<set fetch="select" inverse="true" lazy="true" name="realmAccounts" table="realm_account">
84+
<key>
85+
<column name="fk_realm" not-null="true">
86+
<comment>Foreign key to the realm.</comment>
87+
</column>
88+
</key>
89+
<one-to-many class="eu.jangos.auth.model.RealmAccount"/>
90+
</set>
91+
</class>
92+
</hibernate-mapping>

0 commit comments

Comments
 (0)