Files
ClassContent/历届学生/front-end-team-11/项目开发/学生项目/冯文焌/backendv2/src/dao/LinkDao.ts
2024-09-27 02:06:13 +08:00

27 lines
718 B
TypeScript

import { User, selectUserField } from '@/entity/User';
import { User as UserType } from '@/m_res/user'
import { Service, Inject } from 'typedi'
import { Entity } from '@/utils/orm'
import { addUser } from '@/model/request/User';
import moment from 'moment';
import md5 from 'md5';
import { JsonResult, msgList, res } from '@/utils/jsonResult';
import jsonwebtoken from 'jsonwebtoken'
import config from '@/config'
import { Link } from '@/entity/Link';
@Service()
export class LinkDao {
@Inject()
orm!: Entity
@Inject()
json!: JsonResult<any>;
async GetAllLink(): Promise<res<Link[]>> {
let res = await this.orm.repository(Link).getMany();
return this.json.success(res);
}
}