Skip to content

Commit

Permalink
[TDC-24] Sticker Domain 설계
Browse files Browse the repository at this point in the history
  • Loading branch information
yerimkoko committed Jan 3, 2024
1 parent 40573c6 commit 7420c7e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.threedollar.domain.sticker;


import com.threedollar.domain.AccountType;
import com.threedollar.domain.BaseEntity;
import lombok.Getter;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Entity
@Getter
@NoArgsConstructor
public class Sticker extends BaseEntity {

@Column(nullable = false)
@Enumerated(EnumType.STRING)
private StickerType stickerType;

@Column(nullable = false)
private String imageUrl;

@Column(nullable = false)
@Enumerated(EnumType.STRING)
private AccountType accountType;

@Column(nullable = false)
private String accountId;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.threedollar.domain.sticker;

import lombok.Getter;

@Getter
public enum StickerType {

POLL("투표"),

;
private final String description;

StickerType(String description) {
this.description = description;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.threedollar.domain.sticker.repository;

import com.threedollar.domain.sticker.Sticker;
import org.springframework.data.jpa.repository.JpaRepository;

public interface StickerRepository extends JpaRepository<Sticker, Long> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.threedollar.domain.sticker.repository;

public class StickerRepositoryCustom {
}

0 comments on commit 7420c7e

Please sign in to comment.