/*
 Navicat Premium Data Transfer

 Source Server         : saiyi
 Source Server Type    : SQLite
 Source Server Version : 3021000
 Source Schema         : main

 Target Server Type    : SQLite
 Target Server Version : 3021000
 File Encoding         : 65001

 Date: 24/08/2020 10:36:58
*/

PRAGMA foreign_keys = false;

-- ----------------------------
-- Table structure for special
-- ----------------------------
DROP TABLE IF EXISTS "special";
CREATE TABLE "special" (
  "id" integer NOT NULL COLLATE BINARY PRIMARY KEY AUTOINCREMENT,
  "pay_time" integer,     -- 入账日期
  "company" text,  -- 公司名称
  "contract_no" text,       -- 合同号
  "goods_category" text,    -- 产品类别
  "goods_type" text NOT NULL,       -- 产品型号
  "amount" real,      -- 数量（KG）
  "price" real,      -- 单价(元)
  "base_price" real,   -- 公司低价(元)
  "price_rate" real,  -- 价格比例
  "contract_value" real,      -- 合同额(元)
  "agency" real,     -- 代理费(元)
  "actual_value" real,    -- 实际合同额(元)
  "shipping" real,   -- 货物运输费(元)
  "receive_money" real,    -- 收款金额(元)
  "period_balance" real,    -- 上期结余(元)
  "actual_money" real,    -- 实收金额(元)
  "current_balance" real,     -- 本期结余(元)
  "commission_rate" real,  -- 提成比例
  "commission_money" real,  -- 提成额(元)
  "seller" text, 
  "remark" text,
  CONSTRAINT "contract_no" UNIQUE ("contract_no" COLLATE BINARY ASC)
);

-- ----------------------------
-- Auto increment value for special
-- ----------------------------
UPDATE "sqlite_sequence" SET seq = 11 WHERE name = 'special';

-- ----------------------------
-- Indexes structure for table special
-- ----------------------------
CREATE INDEX "pay_time_copy1"
ON "special" (
  "pay_time" COLLATE BINARY DESC
);
CREATE INDEX "seller_name_copy1"
ON "special" (
  "seller" COLLATE BINARY ASC
);

PRAGMA foreign_keys = true;
