1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 'use strict';
- module.exports = app => {
- const mongoose = app.mongoose;
- const Schema = mongoose.Schema;
- const OverRangeSchema = new Schema({
- userid: {
- type: Schema.Types.ObjectId,
- ref: 'sysUser',
- },
- dept1: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- dept2: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- dept3: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- dept4: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- dept5: {
- type: Schema.Types.ObjectId,
- ref: 'sysDept',
- },
- fid: { type: Schema.Types.ObjectId }, // 戶Id
- infoId: { type: Schema.Types.ObjectId }, // 老人Id
- oldInfo: { type: String }, // 老人信息
- oldLocation: { type: String }, // 老人位置信息 ----采集信息
- lat: { type: String }, // 探访员纬度
- lng: { type: String }, // 探访员经度
- visitLocation: { type: String }, // 探访 位置信息
- distance: { type: String }, // 距离
- visitTime: { type: Date, default: Date.now }, // 探访时间
- });
- return mongoose.model('overRange', OverRangeSchema, 'overRange');
- };
|