|
| 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> |
0 commit comments