Mercurial > pub > ModelGenerator
diff data/users.xml @ 3:437127ab6a12
non-working version
separate common model templates from csharp templates, plans to support complex
primary and foreign keys
author | cin |
---|---|
date | Wed, 28 Feb 2018 02:10:29 +0300 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/users.xml Wed Feb 28 02:10:29 2018 +0300 @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<package xmlns="http://implab.org/schemas/data-model.v1.xsd" + xmlns:f="http://implab.org/schemas/data-model/geo.v1.xsd" xmlns:clr="http://implab.org/schemas/data-model/dotnet.v1.xsd" + xmlns:sql="http://implab.org/schemas/data-model/sql.v1.xsd" xmlns:esri="http://geopallada.ru/schemas/data-model/esri.v1.xsd" + name="users" version="1.0" clr:namespace="Pallada.PoiskMore.Model"> + + <import href="types.xml" /> + + <entity name="User"> + <primaryKey name="Id" type="uuid"/> + <property name="login" type="string" /> + <property name="enabled" type="boolean" /> + <sql:unique name="login_unique"> + <member name="login"/> + </sql:unique> + </entity> + + <entity name="Session"> + <primaryKey name="Id" type="uuid" /> + <hasA name="User" type="User"> + <!-- {memberName}{pkPropertyName} --> + <thisKey/> + </hasA> + </entity> + + <entity name="UserRole"> + <primaryKey> + <use name="UserId"/> + <use name="RoleId"/> + </primaryKey> + + <property name="UserId" type="uuid"/> + <property name="RoleId" type="uuid"/> + + <property name="Inherited" type="boolean"/> + + <hasA name="User" type="User"> + <thisKey use="UserId"/> + </hasA> + + <hasA name="Role" type="Role"> + <thisKey use="RoleId"/> + </hasA> + </entity> + + <entity name="Journal"> + <primaryKey name="Id" type="uuid"/> + + <hasA name="LoginUser" > + <thisKey name="UserLogin" matches="Login"/> + </hasA> + + <property name="action" type="string"/> + </entity> + +</package> \ No newline at end of file