function _ts_decorate(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;
}
function _ts_metadata(k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
}
import { Column, Entity, JoinColumn, ManyToOne, PrimaryColumn } from "typeorm";
import { id } from "../id.js";
import { User } from "./user.js";
export let ReversiGame = class ReversiGame {
    id;
    startedAt;
    endedAt;
    user1Id;
    user1;
    user2Id;
    user2;
    user1Ready;
    user2Ready;
    black;
    isStarted;
    isEnded;
    winnerId;
    surrenderedUserId;
    timeoutUserId;
    timeLimitForEachTurn;
    logs;
    map;
    bw;
    noIrregularRules;
    isLlotheo;
    canPutEverywhere;
    loopedBoard;
    form1;
    form2;
    crc32;
};
_ts_decorate([
    PrimaryColumn(id()),
    _ts_metadata("design:type", String)
], ReversiGame.prototype, "id", void 0);
_ts_decorate([
    Column("timestamp with time zone", {
        nullable: true,
        comment: "The started date of the ReversiGame."
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "startedAt", void 0);
_ts_decorate([
    Column("timestamp with time zone", {
        nullable: true,
        comment: "The ended date of the ReversiGame."
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "endedAt", void 0);
_ts_decorate([
    Column(id()),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "user1Id", void 0);
_ts_decorate([
    ManyToOne(()=>User, {
        onDelete: "CASCADE"
    }),
    JoinColumn(),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "user1", void 0);
_ts_decorate([
    Column(id()),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "user2Id", void 0);
_ts_decorate([
    ManyToOne(()=>User, {
        onDelete: "CASCADE"
    }),
    JoinColumn(),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "user2", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "user1Ready", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "user2Ready", void 0);
_ts_decorate([
    Column("integer", {
        nullable: true
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "black", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "isStarted", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "isEnded", void 0);
_ts_decorate([
    Column({
        ...id(),
        nullable: true
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "winnerId", void 0);
_ts_decorate([
    Column({
        ...id(),
        nullable: true
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "surrenderedUserId", void 0);
_ts_decorate([
    Column({
        ...id(),
        nullable: true
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "timeoutUserId", void 0);
_ts_decorate([
    Column("smallint", {
        default: 90
    }),
    _ts_metadata("design:type", Number)
], ReversiGame.prototype, "timeLimitForEachTurn", void 0);
_ts_decorate([
    Column("jsonb", {
        default: []
    }),
    _ts_metadata("design:type", Array)
], ReversiGame.prototype, "logs", void 0);
_ts_decorate([
    Column("varchar", {
        array: true,
        length: 64
    }),
    _ts_metadata("design:type", Array)
], ReversiGame.prototype, "map", void 0);
_ts_decorate([
    Column("varchar", {
        length: 32
    }),
    _ts_metadata("design:type", String)
], ReversiGame.prototype, "bw", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "noIrregularRules", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "isLlotheo", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "canPutEverywhere", void 0);
_ts_decorate([
    Column("boolean", {
        default: false
    }),
    _ts_metadata("design:type", Boolean)
], ReversiGame.prototype, "loopedBoard", void 0);
_ts_decorate([
    Column("jsonb", {
        nullable: true,
        default: null
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "form1", void 0);
_ts_decorate([
    Column("jsonb", {
        nullable: true,
        default: null
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "form2", void 0);
_ts_decorate([
    Column("varchar", {
        length: 32,
        nullable: true
    }),
    _ts_metadata("design:type", Object)
], ReversiGame.prototype, "crc32", void 0);
ReversiGame = _ts_decorate([
    Entity("reversi_game")
], ReversiGame);
