<?xml version="1.0" encoding="utf-8"?>
<Tables Version="9.8.6755.22252" Output="Entity" NameSpace="NewLife.GitCandy.Entity" ConnName="GitCandy" BaseClass="Entity">
<Table Name="User" Description="用户" DbType="SqlServer">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="Name" DataType="String" Master="True" Description="名称。登录用户名" />
<Column Name="NickName" DataType="String" Description="显示名。昵称、中文名等" />
<Column Name="Email" DataType="String" Description="邮件" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="IsTeam" DataType="Boolean" Description="团队" />
<Column Name="Description" DataType="String" Length="500" Description="描述" />
<Column Name="LinkID" DataType="Int32" Description="链接。连接到基础用户" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="Name" Unique="True" />
<Index Columns="LinkID" />
</Indexes>
</Table>
<Table Name="Repository" Description="仓库" DbType="SqlServer">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="OwnerID" DataType="Int32" Description="拥有者" />
<Column Name="Name" DataType="String" Master="True" Description="名称" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="IsPrivate" DataType="Boolean" Description="私有" />
<Column Name="AllowAnonymousRead" DataType="Boolean" Description="匿名读" />
<Column Name="AllowAnonymousWrite" DataType="Boolean" Description="匿名写" />
<Column Name="Commits" DataType="Int32" Description="提交数" />
<Column Name="Branches" DataType="Int32" Description="分支数" />
<Column Name="Contributors" DataType="Int32" Description="参与者" />
<Column Name="Files" DataType="Int32" Description="文件数" />
<Column Name="Size" DataType="Int64" Description="源码大小" />
<Column Name="LastCommit" DataType="DateTime" Description="最后提交" />
<Column Name="Views" DataType="Int32" Description="浏览数" />
<Column Name="Downloads" DataType="Int32" Description="下载数" />
<Column Name="LastView" DataType="DateTime" Description="最后浏览" />
<Column Name="Description" DataType="String" Length="500" Description="描述" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="OwnerID,Name" Unique="True" />
<Index Columns="Name" />
</Indexes>
</Table>
<Table Name="UserTeam" Description="用户团队" DbType="SqlServer">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="UserID" DataType="Int32" Description="用户" />
<Column Name="TeamID" DataType="Int32" Description="团队" />
<Column Name="IsAdmin" DataType="Boolean" Description="管理员" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="UserID,TeamID" Unique="True" />
<Index Columns="TeamID" />
</Indexes>
</Table>
<Table Name="UserRepository" Description="用户仓库" DbType="SqlServer">
<Columns>
<Column Name="ID" DataType="Int32" Identity="True" PrimaryKey="True" Description="编号" />
<Column Name="UserID" DataType="Int32" Description="用户" />
<Column Name="RepositoryID" DataType="Int32" Description="仓库" />
<Column Name="AllowRead" DataType="Boolean" Description="允许读" />
<Column Name="AllowWrite" DataType="Boolean" Description="允许写" />
<Column Name="IsOwner" DataType="Boolean" Description="拥有者" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />
<Column Name="CreateIP" DataType="String" Description="创建地址" />
<Column Name="UpdateUserID" DataType="Int32" Description="更新者" />
<Column Name="UpdateTime" DataType="DateTime" Description="更新时间" />
<Column Name="UpdateIP" DataType="String" Description="更新地址" />
</Columns>
<Indexes>
<Index Columns="UserID,RepositoryID" Unique="True" />
</Indexes>
</Table>
</Tables>
|