You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.5 KiB
70 lines
1.5 KiB
/* eslint-disable*/
|
|
'use strict';
|
|
|
|
module.exports = dc => {
|
|
const DataTypes = dc.ORM;
|
|
const sequelize = dc.orm;
|
|
const Qrcode = sequelize.define("qrcode", {
|
|
id: {
|
|
type: DataTypes.INTEGER,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: null,
|
|
primaryKey: true,
|
|
field: "id",
|
|
autoIncrement: true,
|
|
},
|
|
url: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "二维码图片存储链接",
|
|
primaryKey: false,
|
|
field: "url",
|
|
autoIncrement: false,
|
|
},
|
|
name: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "二维码名称",
|
|
primaryKey: false,
|
|
field: "name",
|
|
autoIncrement: false,
|
|
},
|
|
type: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "类型(图片|文件|链接|视频)",
|
|
primaryKey: false,
|
|
field: "type",
|
|
autoIncrement: false,
|
|
},
|
|
key: {
|
|
type: DataTypes.UUID,
|
|
allowNull: false,
|
|
defaultValue: null,
|
|
comment: "二维码唯一标识",
|
|
primaryKey: false,
|
|
field: "key",
|
|
autoIncrement: false,
|
|
},
|
|
logo: {
|
|
type: DataTypes.STRING,
|
|
allowNull: true,
|
|
defaultValue: null,
|
|
comment: "二维码中间的照片",
|
|
primaryKey: false,
|
|
field: "logo",
|
|
autoIncrement: false,
|
|
},
|
|
}, {
|
|
tableName: "qrcode",
|
|
comment: "",
|
|
indexes: []
|
|
});
|
|
|
|
dc.models.Qrcode = Qrcode;
|
|
return Qrcode;
|
|
};
|