手机号固定写进数据库

This commit is contained in:
luying
2020-12-29 11:03:18 +08:00
parent 6d2f353551
commit cf05fc6bb8
2 changed files with 14 additions and 11 deletions

View File

@@ -26,6 +26,9 @@ export default class Sms extends BaseModel {
@prop({ required: true })
countToday: number;
@prop({ required: true })
isFixed: boolean;
public static async findByTel(tel: string, lean = true) {
const sms: SmsType = await smsModel.findOne({ tel }).lean(lean);
return sms;