743 lines
26 KiB
HTML
743 lines
26 KiB
HTML
<!DOCTYPE HTML>
|
|
<html lang="" >
|
|
<head>
|
|
<title>Models · GORM Guide</title>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
<meta name="description" content="Gorm has defined struct gorm.Model, which could be embeded in your models, it will add fields ID, CreatedAt, UpdatedAt, DeletedAt to your model">
|
|
<meta name="generator" content="GitBook 3.0.0-pre.1">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/style.css">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-prism/prism.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<meta name="HandheldFriendly" content="true"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
|
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
|
|
|
|
|
<link rel="next" href="models.html" />
|
|
|
|
|
|
<link rel="prev" href="database.html" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="book"
|
|
data-level="2"
|
|
data-chapter-title="Models"
|
|
data-filepath="models.md"
|
|
data-basepath=""
|
|
data-revision="Sun Feb 28 2016 16:13:20 GMT+0800 (CST)"
|
|
data-innerlanguage="">
|
|
|
|
|
|
<div class="book-summary">
|
|
|
|
<nav role="navigation">
|
|
<ul class="summary">
|
|
|
|
|
|
|
|
<li class="chapter " data-level="0" data-path="./">
|
|
|
|
<a href="./">
|
|
|
|
|
|
Getting Started with GORM
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1" data-path="database.html">
|
|
|
|
<a href="database.html">
|
|
|
|
|
|
<b>1.</b>
|
|
|
|
Database
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.1" data-path="database.html">
|
|
|
|
<a href="database.html#connecting-to-a-database">
|
|
|
|
|
|
<b>1.1.</b>
|
|
|
|
Database Connection
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2" data-path="database.html">
|
|
|
|
<a href="database.html#migration">
|
|
|
|
|
|
<b>1.2.</b>
|
|
|
|
Migration
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter active" data-level="2" data-path="models.html">
|
|
|
|
<a href="models.html">
|
|
|
|
|
|
<b>2.</b>
|
|
|
|
Models
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="2.1" data-path="models.html">
|
|
|
|
<a href="models.html#model-defination">
|
|
|
|
|
|
<b>2.1.</b>
|
|
|
|
Model Defination
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.2" data-path="models.html">
|
|
|
|
<a href="models.html#conventions-overriding-conventions">
|
|
|
|
|
|
<b>2.2.</b>
|
|
|
|
Naming Conventions & Overriding
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3" data-path="associations.html">
|
|
|
|
<a href="associations.html">
|
|
|
|
|
|
<b>2.3.</b>
|
|
|
|
Associations
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="2.3.1" data-path="associations.html">
|
|
|
|
<a href="associations.html#belongs-to">
|
|
|
|
|
|
<b>2.3.1.</b>
|
|
|
|
Belongs To
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3.2" data-path="associations.html">
|
|
|
|
<a href="associations.html#has-one">
|
|
|
|
|
|
<b>2.3.2.</b>
|
|
|
|
Has One
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3.3" data-path="associations.html">
|
|
|
|
<a href="associations.html#has-many">
|
|
|
|
|
|
<b>2.3.3.</b>
|
|
|
|
Has Many
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3.4" data-path="associations.html">
|
|
|
|
<a href="associations.html#many-to-many">
|
|
|
|
|
|
<b>2.3.4.</b>
|
|
|
|
Many To Many
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3.5" data-path="associations.html">
|
|
|
|
<a href="associations.html#polymorphism">
|
|
|
|
|
|
<b>2.3.5.</b>
|
|
|
|
Polymorphism
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.3.6" data-path="associations.html">
|
|
|
|
<a href="associations.html#association-mode">
|
|
|
|
|
|
<b>2.3.6.</b>
|
|
|
|
Association Mode
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3" data-path="curd.html">
|
|
|
|
<a href="curd.html">
|
|
|
|
|
|
<b>3.</b>
|
|
|
|
CRUD: Reading and Writing Data
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="3.1" data-path="curd.html">
|
|
|
|
<a href="curd.html#create">
|
|
|
|
|
|
<b>3.1.</b>
|
|
|
|
Create
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.2" data-path="curd.html">
|
|
|
|
<a href="curd.html#query">
|
|
|
|
|
|
<b>3.2.</b>
|
|
|
|
Query
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.3" data-path="curd.html">
|
|
|
|
<a href="curd.html#preloading">
|
|
|
|
|
|
<b>3.3.</b>
|
|
|
|
Preloading (Eager Loading)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.4" data-path="curd.html">
|
|
|
|
<a href="curd.html#update">
|
|
|
|
|
|
<b>3.4.</b>
|
|
|
|
Update
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.5" data-path="curd.html">
|
|
|
|
<a href="curd.html#delete">
|
|
|
|
|
|
<b>3.5.</b>
|
|
|
|
Delete / Soft Delete
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="4" data-path="callbacks.html">
|
|
|
|
<a href="callbacks.html">
|
|
|
|
|
|
<b>4.</b>
|
|
|
|
Callbacks
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="5" data-path="advanced.html">
|
|
|
|
<a href="advanced.html">
|
|
|
|
|
|
<b>5.</b>
|
|
|
|
Advanced Usage
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="5.1" data-path="advanced.html">
|
|
|
|
<a href="advanced.html#error-handling">
|
|
|
|
|
|
<b>5.1.</b>
|
|
|
|
Error Handling
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="5.2" data-path="advanced.html">
|
|
|
|
<a href="advanced.html#transactions">
|
|
|
|
|
|
<b>5.2.</b>
|
|
|
|
Transactions
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="5.3" data-path="advanced.html">
|
|
|
|
<a href="advanced.html#sql-builder">
|
|
|
|
|
|
<b>5.3.</b>
|
|
|
|
Raw SQL & SQL Builder
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="5.4" data-path="advanced.html">
|
|
|
|
<a href="advanced.html#compose-primary-key">
|
|
|
|
|
|
<b>5.4.</b>
|
|
|
|
Composite Primary Key
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="5.5" data-path="advanced.html">
|
|
|
|
<a href="advanced.html#logger">
|
|
|
|
|
|
<b>5.5.</b>
|
|
|
|
Overriding Logger
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="6" data-path="development.html">
|
|
|
|
<a href="development.html">
|
|
|
|
|
|
<b>6.</b>
|
|
|
|
Development
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="6.1" data-path="development.html">
|
|
|
|
<a href="development.html#callbacks">
|
|
|
|
|
|
<b>6.1.</b>
|
|
|
|
Write Plugins
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="book-body">
|
|
|
|
<div class="body-inner">
|
|
|
|
|
|
<div class="book-header" role="navigation">
|
|
|
|
|
|
<!-- Title -->
|
|
<h1>
|
|
<i class="fa fa-circle-o-notch fa-spin"></i>
|
|
<a href="" >Models</a>
|
|
</h1>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="page-wrapper" tabindex="-1" role="main">
|
|
<div class="page-inner">
|
|
<section class="normal markdown-section">
|
|
|
|
<h1 id="models">Models</h1>
|
|
<!-- toc -->
|
|
<ul>
|
|
<li><a href="#model-defination">Model Defination</a></li>
|
|
<li><a href="#conventions-overriding-conventions">Conventions & Overriding Conventions</a><ul>
|
|
<li><a href="#gormmodel-struct"><code>gorm.Model</code> struct</a></li>
|
|
<li><a href="#table-name-is-the-pluralized-version-of-struct-name">Table name is the pluralized version of struct name</a></li>
|
|
<li><a href="#column-name-is-the-snake-case-of-fields-name">Column name is the snake case of field's name</a></li>
|
|
<li><a href="#field-id-as-primary-key">Field <code>ID</code> as primary key</a></li>
|
|
<li><a href="#field-createdat-used-to-store-records-created-time">Field <code>CreatedAt</code> used to store record's created time</a></li>
|
|
<li><a href="#use-updatedat-used-to-store-records-updated-time">Use <code>UpdatedAt</code> used to store record's updated time</a></li>
|
|
<li><a href="#use-deletedat-to-store-records-deleted-time-if-field-exists">Use <code>DeletedAt</code> to store record's deleted time if field exists</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- toc stop -->
|
|
<h2 id="model-defination">Model Defination</h2>
|
|
<pre><code class="lang-go"><span class="token keyword">type</span> User <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
gorm<span class="token operator">.</span>Model
|
|
Birthday time<span class="token operator">.</span>Time
|
|
Age <span class="token builtin">int</span>
|
|
Name <span class="token builtin">string</span> <span class="token string">`sql:"size:255"`</span> <span class="token comment" spellcheck="true">// Default size for string is 255, you could reset it with this tag</span>
|
|
Num <span class="token builtin">int</span> <span class="token string">`sql:"AUTO_INCREMENT"`</span>
|
|
IgnoreMe <span class="token builtin">int</span> <span class="token string">`sql:"-"`</span> <span class="token comment" spellcheck="true">// Ignore this field</span>
|
|
<span class="token operator">}</span>
|
|
</code></pre>
|
|
<h2 id="conventions--overriding-conventions">Conventions & Overriding Conventions</h2>
|
|
<h3 id="gormmodel-struct"><code>gorm.Model</code> struct</h3>
|
|
<p>Gorm has defined struct <code>gorm.Model</code>, which could be embeded in your models, it will add fields <code>ID</code>, <code>CreatedAt</code>, <code>UpdatedAt</code>, <code>DeletedAt</code> to your model</p>
|
|
<pre><code class="lang-go"><span class="token comment" spellcheck="true">// Model's definition</span>
|
|
<span class="token keyword">type</span> Model <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
ID <span class="token builtin">uint</span> <span class="token string">`gorm:"primary_key"`</span>
|
|
CreatedAt time<span class="token operator">.</span>Time
|
|
UpdatedAt time<span class="token operator">.</span>Time
|
|
DeletedAt <span class="token operator">*</span>time<span class="token operator">.</span>Time
|
|
<span class="token operator">}</span>
|
|
</code></pre>
|
|
<h3 id="table-name-is-the-pluralized-version-of-struct-name">Table name is the pluralized version of struct name</h3>
|
|
<pre><code class="lang-go"><span class="token keyword">type</span> User <span class="token keyword">struct</span> <span class="token operator">{</span><span class="token operator">}</span> <span class="token comment" spellcheck="true">// default table name is `users`</span>
|
|
|
|
<span class="token comment" spellcheck="true">// set User's table name to be `profiles</span>
|
|
<span class="token keyword">type</span> <span class="token operator">(</span>User<span class="token operator">)</span> <span class="token function">TableName<span class="token punctuation">(</span></span><span class="token operator">)</span> <span class="token builtin">string</span> <span class="token operator">{</span>
|
|
<span class="token keyword">return</span> <span class="token string">"profiles"</span>
|
|
<span class="token operator">}</span>
|
|
|
|
<span class="token keyword">func</span> <span class="token operator">(</span>u User<span class="token operator">)</span> <span class="token function">TableName<span class="token punctuation">(</span></span><span class="token operator">)</span> <span class="token builtin">string</span> <span class="token operator">{</span>
|
|
<span class="token keyword">if</span> u<span class="token operator">.</span>Role <span class="token operator">==</span> <span class="token string">"admin"</span> <span class="token operator">{</span>
|
|
<span class="token keyword">return</span> <span class="token string">"admin_users"</span>
|
|
<span class="token operator">}</span> <span class="token keyword">else</span> <span class="token operator">{</span>
|
|
<span class="token keyword">return</span> <span class="token string">"users"</span>
|
|
<span class="token operator">}</span>
|
|
<span class="token operator">}</span>
|
|
|
|
<span class="token comment" spellcheck="true">// Disable table name's pluralization globally</span>
|
|
db<span class="token operator">.</span><span class="token function">SingularTable<span class="token punctuation">(</span></span><span class="token boolean">true</span><span class="token operator">)</span> <span class="token comment" spellcheck="true">// if set this to true, `User`'s default table name will be `user`, table name setted with `TableName` won't be affected</span>
|
|
</code></pre>
|
|
<h3 id="column-name-is-the-snake-case-of-fields-name">Column name is the snake case of field's name</h3>
|
|
<pre><code class="lang-go"><span class="token keyword">type</span> User <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
ID <span class="token builtin">uint</span> <span class="token comment" spellcheck="true">// column name will be `id`</span>
|
|
Name <span class="token builtin">string</span> <span class="token comment" spellcheck="true">// column name will be `name`</span>
|
|
Birthday time<span class="token operator">.</span>Time <span class="token comment" spellcheck="true">// column name will be `birthday`</span>
|
|
CreatedAt time<span class="token operator">.</span>Time <span class="token comment" spellcheck="true">// column name will be `created_at`</span>
|
|
<span class="token operator">}</span>
|
|
|
|
<span class="token keyword">type</span> Animal <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
AnimalId <span class="token builtin">int64</span> <span class="token string">`gorm:"column:beast_id"`</span> <span class="token comment" spellcheck="true">// set column name to `beast_id`</span>
|
|
Birthday time<span class="token operator">.</span>Time <span class="token string">`gorm:"column:day_of_the_beast"`</span> <span class="token comment" spellcheck="true">// set column name to `day_of_the_beast`</span>
|
|
Age <span class="token builtin">int64</span> <span class="token string">`gorm:"column:age_of_the_beast"`</span> <span class="token comment" spellcheck="true">// set column name to `age_of_the_beast`</span>
|
|
<span class="token operator">}</span>
|
|
</code></pre>
|
|
<h3 id="field-id-as-primary-key">Field <code>ID</code> as primary key</h3>
|
|
<pre><code class="lang-go"><span class="token keyword">type</span> User <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
ID <span class="token builtin">uint</span> <span class="token comment" spellcheck="true">// field named `ID` is the default primary key for `User`</span>
|
|
Name <span class="token builtin">string</span>
|
|
<span class="token operator">}</span>
|
|
|
|
<span class="token comment" spellcheck="true">// your could also use tag `primary_key` to set other field as primary key</span>
|
|
<span class="token keyword">type</span> Animal <span class="token keyword">struct</span> <span class="token operator">{</span>
|
|
AnimalId <span class="token builtin">int64</span> <span class="token string">`gorm:"primary_key"`</span> <span class="token comment" spellcheck="true">// set AnimalId to be primary key</span>
|
|
Name <span class="token builtin">string</span>
|
|
Age <span class="token builtin">int64</span>
|
|
<span class="token operator">}</span>
|
|
</code></pre>
|
|
<h3 id="field-createdat-used-to-store-records-created-time">Field <code>CreatedAt</code> used to store record's created time</h3>
|
|
<p>Create records having <code>CreatedAt</code> field will set it to current time.</p>
|
|
<pre><code class="lang-go">db<span class="token operator">.</span><span class="token function">Create<span class="token punctuation">(</span></span><span class="token operator">&</span>user<span class="token operator">)</span> <span class="token comment" spellcheck="true">// will set `CreatedAt` to current time</span>
|
|
|
|
<span class="token comment" spellcheck="true">// To change its value, you could use `Update`</span>
|
|
db<span class="token operator">.</span><span class="token function">Model<span class="token punctuation">(</span></span><span class="token operator">&</span>user<span class="token operator">)</span><span class="token operator">.</span><span class="token function">Update<span class="token punctuation">(</span></span><span class="token string">"CreatedAt"</span><span class="token operator">,</span> time<span class="token operator">.</span><span class="token function">Now<span class="token punctuation">(</span></span><span class="token operator">)</span><span class="token operator">)</span>
|
|
</code></pre>
|
|
<h3 id="use-updatedat-used-to-store-records-updated-time">Use <code>UpdatedAt</code> used to store record's updated time</h3>
|
|
<p>Save records having <code>UpdatedAt</code> field will set it to current time.</p>
|
|
<pre><code class="lang-go">db<span class="token operator">.</span><span class="token function">Save<span class="token punctuation">(</span></span><span class="token operator">&</span>user<span class="token operator">)</span> <span class="token comment" spellcheck="true">// will set `UpdatedAt` to current time</span>
|
|
db<span class="token operator">.</span><span class="token function">Model<span class="token punctuation">(</span></span><span class="token operator">&</span>user<span class="token operator">)</span><span class="token operator">.</span><span class="token function">Update<span class="token punctuation">(</span></span><span class="token string">"name"</span><span class="token operator">,</span> <span class="token string">"jinzhu"</span><span class="token operator">)</span> <span class="token comment" spellcheck="true">// will set `UpdatedAt` to current time</span>
|
|
</code></pre>
|
|
<h3 id="use-deletedat-to-store-records-deleted-time-if-field-exists">Use <code>DeletedAt</code> to store record's deleted time if field exists</h3>
|
|
<p>Delete records having <code>DeletedAt</code> field, it won't delete the record from database, but will set field <code>DeletedAt</code>'s value to current time.</p>
|
|
|
|
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a href="database.html" class="navigation navigation-prev " aria-label="Previous page: Migration">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
|
|
<a href="models.html" class="navigation navigation-next " aria-label="Next page: Model Defination">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script src="gitbook/app.js"></script>
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-github/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-edit-link/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-anker-enable/anker.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/lunr.min.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-fontsettings/buttons.js"></script>
|
|
|
|
|
|
<script>
|
|
require(["gitbook"], function(gitbook) {
|
|
gitbook.start({"fontsettings":{"theme":"night","family":"sans","size":4},"toc":{"addClass":true,"className":"toc"},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"base":"https://github.com/jinzhu/gorm/edit/master","label":"Edit This Page"},"prism":{},"anker-enable":{},"search":{"maxIndexSize":1000000},"sharing":{"all":["facebook","google","instapaper","twitter","weibo"],"facebook":true,"google":false,"instapaper":false,"twitter":true,"vk":false,"weibo":false},"theme-default":{"styles":{"ebook":"styles/ebook.css","epub":"styles/epub.css","mobi":"styles/mobi.css","pdf":"styles/pdf.css","print":"styles/print.css","website":"styles/website.css"}}});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|