mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
complete setting and editing description
This commit is contained in:
parent
c040e33a8a
commit
8f60a5efd6
10 changed files with 118 additions and 91 deletions
|
@ -2,24 +2,22 @@ const mongoose = require('mongoose');
|
|||
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const RouteSchema = new Schema(
|
||||
{
|
||||
_id: { type: String, required: true },
|
||||
title: { type: String, default: '' },
|
||||
// address: { type: String, required: true },
|
||||
version: { type: Number, default: 2 },
|
||||
route: { type: Array, default: [] },
|
||||
stickers: { type: Array, default: [] },
|
||||
owner: { type: Schema.Types.ObjectId, ref: 'User' },
|
||||
distance: { type: Number, default: 0 },
|
||||
is_public: { type: Boolean, default: false },
|
||||
is_starred: { type: Boolean, default: false },
|
||||
is_deleted: { type: Boolean, default: false },
|
||||
created_at: { type: Date, default: Date.now() },
|
||||
updated_at: { type: Date, default: Date.now() },
|
||||
logo: { type: String, default: 'DEFAULT' },
|
||||
provider: { type: String, default: 'DEFAULT' },
|
||||
},
|
||||
);
|
||||
const RouteSchema = new Schema({
|
||||
_id: { type: String, required: true },
|
||||
title: { type: String, default: '' },
|
||||
version: { type: Number, default: 2 },
|
||||
route: { type: Array, default: [] },
|
||||
stickers: { type: Array, default: [] },
|
||||
owner: { type: Schema.Types.ObjectId, ref: 'User' },
|
||||
distance: { type: Number, default: 0 },
|
||||
is_public: { type: Boolean, default: false },
|
||||
is_starred: { type: Boolean, default: false },
|
||||
is_deleted: { type: Boolean, default: false },
|
||||
created_at: { type: Date, default: Date.now() },
|
||||
updated_at: { type: Date, default: Date.now() },
|
||||
logo: { type: String, default: 'DEFAULT' },
|
||||
provider: { type: String, default: 'DEFAULT' },
|
||||
description: { type: String, default: '' },
|
||||
});
|
||||
|
||||
module.exports.RouteSchema = RouteSchema;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue