zjz1993
5 years ago
5 changed files with 281 additions and 11 deletions
@ -0,0 +1,71 @@ |
|||||||
|
"use strict"; |
||||||
|
var __extends = (this && this.__extends) || (function () { |
||||||
|
var extendStatics = function (d, b) { |
||||||
|
extendStatics = Object.setPrototypeOf || |
||||||
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || |
||||||
|
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; |
||||||
|
return extendStatics(d, b); |
||||||
|
}; |
||||||
|
return function (d, b) { |
||||||
|
extendStatics(d, b); |
||||||
|
function __() { this.constructor = d; } |
||||||
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); |
||||||
|
}; |
||||||
|
})(); |
||||||
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { |
||||||
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; |
||||||
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
||||||
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; |
||||||
|
return c > 3 && r && Object.defineProperty(target, key, r), r; |
||||||
|
}; |
||||||
|
var __metadata = (this && this.__metadata) || function (k, v) { |
||||||
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); |
||||||
|
}; |
||||||
|
exports.__esModule = true; |
||||||
|
var TypeORM = require("typeorm"); |
||||||
|
var common_1 = require("./common"); |
||||||
|
var Reply = /** @class */ (function (_super) { |
||||||
|
__extends(Reply, _super); |
||||||
|
function Reply() { |
||||||
|
return _super !== null && _super.apply(this, arguments) || this; |
||||||
|
} |
||||||
|
Reply.cache = false; |
||||||
|
__decorate([ |
||||||
|
TypeORM.PrimaryGeneratedColumn(), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "id"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Column({ nullable: true, type: "mediumtext" }), |
||||||
|
__metadata("design:type", String) |
||||||
|
], Reply.prototype, "content"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Index(), |
||||||
|
TypeORM.Column({ nullable: true, type: "integer" }), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "user_id"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Index(), |
||||||
|
TypeORM.Column({ nullable: true, type: "integer" }), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "comment_id"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Index(), |
||||||
|
TypeORM.Column({ nullable: true, type: "integer" }), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "article_id"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Column({ nullable: true, type: "integer" }), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "public_time"); |
||||||
|
__decorate([ |
||||||
|
TypeORM.Column({ nullable: true, type: "integer" }), |
||||||
|
__metadata("design:type", Number) |
||||||
|
], Reply.prototype, "update_time"); |
||||||
|
Reply = __decorate([ |
||||||
|
TypeORM.Entity() |
||||||
|
], Reply); |
||||||
|
return Reply; |
||||||
|
}(common_1["default"])); |
||||||
|
exports["default"] = Reply; |
||||||
|
; |
||||||
|
//# sourceMappingURL=reply.js.map
|
@ -0,0 +1 @@ |
|||||||
|
{"version":3,"file":"reply.js","sourceRoot":"","sources":["../models/reply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAmC;AACnC,mCAA6B;AAO7B;IAAmC,yBAAK;IAAxC;;IA0BA,CAAC;IAzBU,WAAK,GAAG,KAAK,CAAC;IAGrB;QADC,OAAO,CAAC,sBAAsB,EAAE;;6BACtB;IAGX;QADC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;kCACvC;IAIhB;QAFC,OAAO,CAAC,KAAK,EAAE;QACf,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;kCACpC;IAIhB;QAFC,OAAO,CAAC,KAAK,EAAE;QACf,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;qCACjC;IAInB;QAFC,OAAO,CAAC,KAAK,EAAE;QACf,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;qCACjC;IAGnB;QADC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sCAChC;IAGpB;QADC,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;sCAChC;IAzBH,KAAK;QADzB,OAAO,CAAC,MAAM,EAAE;OACI,KAAK,CA0BzB;IAAD,YAAC;CAAA,AA1BD,CAAmC,mBAAK,GA0BvC;qBA1BoB,KAAK;AA0BzB,CAAC"} |
@ -0,0 +1,35 @@ |
|||||||
|
import * as TypeORM from "typeorm"; |
||||||
|
import Model from "./common"; |
||||||
|
import User from "./user"; |
||||||
|
import Article from "./article"; |
||||||
|
|
||||||
|
declare var syzoj: any; |
||||||
|
|
||||||
|
@TypeORM.Entity() |
||||||
|
export default class Reply extends Model { |
||||||
|
static cache = false; |
||||||
|
|
||||||
|
@TypeORM.PrimaryGeneratedColumn() |
||||||
|
id: number; |
||||||
|
|
||||||
|
@TypeORM.Column({ nullable: true, type: "mediumtext" }) |
||||||
|
content: string; |
||||||
|
|
||||||
|
@TypeORM.Index() |
||||||
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
||||||
|
user_id: number; |
||||||
|
|
||||||
|
@TypeORM.Index() |
||||||
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
||||||
|
comment_id: number; |
||||||
|
|
||||||
|
@TypeORM.Index() |
||||||
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
||||||
|
article_id: number; |
||||||
|
|
||||||
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
||||||
|
public_time: number; |
||||||
|
|
||||||
|
@TypeORM.Column({ nullable: true, type: "integer" }) |
||||||
|
update_time: number; |
||||||
|
}; |
Loading…
Reference in new issue